相关疑难解决方法(0)

Selenium Webdriver可以在后台静默打开浏览器窗口吗?

我有一个运行许多测试的selenium测试套件,在每个新测试中,它打开了我打开的任何其他窗口顶部的浏览器窗口.在当地环境中工作时非常震动.有什么办法告诉selenium或操作系统(MAC)在后台打开窗口?

webdriver selenium-grid selenium-webdriver

139
推荐指数
8
解决办法
18万
查看次数

是否可以在Selenium RC中隐藏浏览器?

我正在使用Selenium RC自动执行某些浏览器操作,但我希望浏览器不可见.这可能吗?怎么样?那么Selenium Grid呢?我也可以隐藏Selenium RC窗口吗?

python selenium selenium-rc

91
推荐指数
5
解决办法
8万
查看次数

如何使用java运行Selenium的ghostdriver

我想phantomJS用于一些网络测试,我遇到过GhostDriver(https://github.com/detro/ghostdriver).我使用自述文件中的说明构建它,我可以在指定的端口上运行它,但我不知道如何从我的java代码访问Web驱动程序.为了澄清,我在ruby中看到了这个例子:

  caps = {
  :browserName => "phantomjs",
  :platform => "LINUX"
   }

urlhub = "http://key:secret@hub.testingbot.com:4444/wd/hub"

client = Selenium::WebDriver::Remote::Http::Default.new
client.timeout = 120

@webdriver = Selenium::WebDriver.for :remote, :url => urlhub, :desired_capabilities => caps, :http_client => client
@webdriver.navigate.to "http://www.google.com/"
puts @webdriver.title
@webdriver.save_screenshot("./screenshot.png")
@webdriver.quit
Run Code Online (Sandbox Code Playgroud)

我只是不确定如何从java做同样的事情.

java webdriver phantomjs selenium-webdriver ghostdriver

10
推荐指数
2
解决办法
3万
查看次数