有没有办法从Linux命令行调用Selenium IDE.我真的想要一个命令,运行时会导致Selenium IDE运行当前测试.(这样我可以将它挂钩到gvim的保存钩子中,永远不会把我的手从键盘上移开)
编辑:
我知道如何让PHP单元等运行selenium.这对于运行测试非常有用,问题是我现在正在尝试使用selenium IDE作为宏.IE加载我的应用程序并导航我到我正在处理的部分.这在phpunit中效果不佳,因为它会在测试结束后立即重新加载页面.
下面是我的 Selenium IDE 生成的 XML 文件。
<?xml version="1.0" encoding="UTF-8"?>
<TestCase seleniumIDEVersion="1.0.10" baseURL="http://test.com/">
<selenese>
<command>open</command>
<target><![CDATA[/test/contract/?testId=743474]]></target>
<value><![CDATA[]]></value>
</selenese>
<selenese>
<command>clickAndWait</command>
<target><![CDATA[link=View All Test menus]]></target>
<value><![CDATA[]]></value>
</selenese>
</TestCase>
Run Code Online (Sandbox Code Playgroud)
我想在这里传递一个变量/test/contract/?testId={variable here}而不是数字。
可能吗,请帮帮我。
是否有必要下载Selenium IDE来执行Selenium示例?
我正在尝试在Java上执行Selenium应用程序.请帮助我完成步骤和示例示例...
如何使用selenium IDE检查是否隐藏了HTML元素(display:none :)?
在我的情况下,html是一个按钮,如果元素被隐藏,我希望selenium告诉我.
如果我使用verifyElementPresent,selenium会找到该元素,尽管它是隐藏的.
谢谢!
我希望能够验证(或断言)存在类("框").
我可以用Selenium IDE做到这一点吗?
这是一个使用类"box"的html示例
...
<div class="box documentText">
...
</div>
...
Run Code Online (Sandbox Code Playgroud)
如何验证页面是否包含此类"框"?
我有一个由Selenium IDE生成的 .side 文件,我需要使用Jenkins在CI上运行它。
我使用以下 shell 命令将它作为构建步骤运行:
selenium-side-runner /path/to/file.ide
Run Code Online (Sandbox Code Playgroud)
问题出现的原因是,无论 selenium 测试是否失败,Jenkins 始终显示为成功。
在此线程中,建议将文件上传为通用文件,但仍然缺少执行它的命令 如何将通用文件上传到 Jenkins 作业?
我在这篇文章中找到了一个可能的解决方案,但我希望有一种更简洁的方法来解决这个问题,而不是解析检查错误的结果。 运行 shell 脚本时如何在 Jenkins 中标记构建不稳定
是否有一个插件能够在 Jenkins 上运行 selenium .side 文件,这个插件显示测试的成功/失败?
我需要在 docker 中运行 selenium-side-runner。我在 dockerfile 中编写了安装 Google Chrome 和 googledrive 的操作。但执行代码时,报错如下\xef\xbc\x9a
\n\n WebDriverError: unknown error: Chrome failed to start: exited abnormally.\n (unknown error: DevToolsActivePort file doesn\'t exist)\n (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)\n at Object.throwDecodedError (../../usr/lib/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/error.js:550:15)\n at parseHttpResponse (../../usr/lib/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/http.js:560:13)\n at Executor.execute (../../usr/lib/node_modules/selenium-side-runner/node_modules/selenium-webdriver/lib/http.js:486:26)\nRun Code Online (Sandbox Code Playgroud)\n\n这是我的 dockerfile
\n\nFROM python:3.6-stretch\n\n# install google chrome\nRUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -\nRUN sh -c \'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable …Run Code Online (Sandbox Code Playgroud) 只需使用硒为我填写一些表格.我需要它为我的用户名字段生成一个唯一值.我怎样才能做到这一点?
我有
命令: type
Target: id_of_my_field
值: username + unique_value ???
我正在Thomson Holidays网站(http://www.thomson.co.uk/holidays.html)上进行示例作业.在左侧有一个假日搜索面板.我无法识别WebDriver中的任何这些元素.但是,在IDE中,这些元素是可识别的.需要更多信息,因为这是我第一次遇到这样的问题.以下是代码示例:
WebDriver driver = new FirefoxDriver();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.get("http://www.thomson.co.uk/holidays.html");
driver.findElement(By.id("searchbutton")).click();
driver.findElement(By.id("holidayAttribute_1")).click();
driver.findElement(By.id("holidayAttribute_2")).click();
driver.findElement(By.id("holidayAttribute_3")).click();
Thread.sleep(5000);
Run Code Online (Sandbox Code Playgroud) selenium-ide ×10
selenium ×9
java ×2
webdriver ×2
docker ×1
jenkins ×1
python ×1
selenium-rc ×1