我们正在 Firefox 中使用 Selenium IDE 录制测试。
我们需要将值从只读字段复制到输入字段。
有没有直接的方法可以引用该字段,或者我是否必须存储和使用它。一个例子会很棒。
谢谢。
我是selenium的新手.我想知道如何向用户显示鼠标箭头运动.我的意思是说我们自动化某些事情..我想知道我们如何将鼠标箭头移动到用户身上看到selenium正在进行自动化.可能吗 ???
我们可以清楚地显示被点击的内容,我的意思是鼠标箭头移动点击了哪个按钮.
我希望我很清楚
我知道有Selenium IDE和Selenium Builder作为Firefox插件来记录动作并将它们导出为例如C#-Code.
但是还有一个工具可以帮助您按照PageObject模式创建Selenium(2)WebDriver测试代码吗?我知道这很难,因为程序必须知道如何实现抽象.
据我所知,这样的工具不存在?但是,由工具支持创建Selenium WebDriver PageObject-Code的最佳方法是什么?
也许使用Selenium构建器只是通过id,类名等创建引用并在我的代码中手动实现它们?这可能比我自己决定精确识别元素的速度要快一些.但是为什么Selenium Builder的开发人员动态地创建元素引用
IWebDriver wd = new RemoteWebDriver(DesiredCapabilities.Firefox());
wd.FindElement(By.Id("NameField")).Click();
wd.FindElement(By.Id("NameField")).Clear();
Run Code Online (Sandbox Code Playgroud)
而不是FindBy属性?
[FindsBy(Using = "NameField")]
public IWebElement nameField;
Run Code Online (Sandbox Code Playgroud)
元素将是可重用的,代码将更短.
这是我的示例插件的结构:

这是我构建 XPI 文件的方法:
cd my-addon
C:\Progra~1\7-Zip\7z.exe a -r -y -tzip ../my-addon.xpi *
Run Code Online (Sandbox Code Playgroud)
当我尝试在 Firefox 中加载生成的 xpi 时,出现以下错误:
无法安装此加载项,因为它似乎已损坏。
我错过了什么?
我正在用webdriver运行一些GUI测试.我直接从selenium IDE导出了一些测试.在这个测试中,我不得不降低IDE的运行速度,因为加载了下拉.如何在Selenium webdriver中减慢测试速度?我已经把
driver.manage().timeouts().implicitlyWait(50, TimeUnit.SECONDS);
Run Code Online (Sandbox Code Playgroud)
它一直在快速运行.我知道睡眠选项,但这不是我想要的,我想改变webdriver的默认执行速度.这是我的代码:
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.util.concurrent.TimeUnit;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.Alert;
import org.openqa.selenium.By;
import org.openqa.selenium.NoAlertPresentException;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class ProfileCheck {
private WebDriver driver;
private String baseUrl;
private boolean acceptNextAlert = true;
private final StringBuffer verificationErrors = new StringBuffer();
@Before
public void setUp() throws Exception {
driver = new FirefoxDriver();
baseUrl = "http://localhost:8080";
driver.manage().timeouts().implicitlyWait(50, TimeUnit.SECONDS);
}
@Test
public void testProfileCheck() throws Exception …Run Code Online (Sandbox Code Playgroud) java user-interface selenium selenium-ide selenium-webdriver
请求大家请帮忙,我无法在任何浏览器38,47,54和55上安装selenium IDE.
请帮忙.
我看到了类似的主题,但没有确切的内容。
当我使用 Firefox 和 IDE 时,我能够使用StoreEval | Math.round (Math.random() * 99999999999)创建一个特定长度的随机数。我现在已经转移到 Chrome 以使用 IDE,并且“StoreEval”不再是一个选项。我已经尝试了所有可用的新“存储”选项,但最终在日志中出现以下警告并且未创建编号:
“警告隐式定位器已弃用,请将定位器更改为 id=Math.round (Math.random() * 99999999999”
关于我需要使用/更改的任何想法?我承认我不确定“请将定位器更改为”是什么意思。
谢谢!
使用 selenium ide 为反应应用程序记录测试用例,但无法从 selenium-ide 上传文件。React-dropzone 包用于文件上传。
尝试使用命令“键入”和“发送密钥”,但没有奏效。
硒化物:3.6.0 铬:74.0.3729.108
用 firefox 尝试过,但收到错误消息“目前仅在 Chrome 中支持文件上传”
Command: type
Target: css=input[type=file]
Value: c:\fakepath\test.png
Error: {"code":-32000,"message":"Not allowed"}
Command: send keys
Target: css=input[type=file]
Value: c:\fakepath\test.png
Error: Element is not currently interactable and may not be manipulatedElement is not currently interactable and may not be manipulated
Run Code Online (Sandbox Code Playgroud)
selenium ide 能够上传文件并通过测试用例。
我在Selenium IDE. 我在这个套件中有一个步骤,应该在文本字段中键入一个值。它在该步骤失败,并出现以下错误:
18. click on id=firstName Failed:11:12:59
call to eval() blocked by CSP
Run Code Online (Sandbox Code Playgroud)
我使用Selenium IDE进行网络应用程序的记录测试.
Selenium IDE无法识别我的div中的右键单击.我已经自定义右键单击我的div,我想测试相关功能.
谁能帮我?
谢谢!
托马索
selenium-ide ×10
selenium ×5
c# ×1
eval ×1
file-upload ×1
firefox ×1
java ×1
pageobjects ×1
random ×1
reactjs ×1
selenium-rc ×1