开发者

Why am I unable to launch a URL via Ruby script?

开发者 https://www.devze.com 2023-01-12 01:08 出处:网络
I am a Selenium (Ruby) newbie. I am trying to launch Google homepage as below: @selenium = Selenium::SeleniumDriver.new(\"localhost\", 4444, \"*firefox\", \"http://www.google.com\", 10000);

I am a Selenium (Ruby) newbie.

I am trying to launch Google homepage as below:

@selenium = Selenium::SeleniumDriver.new("localhost", 4444, "*firefox", "http://www.google.com", 10000);
@selenium.start

However, after the script runs, it launches Firefox with below URL:

http://localhost:4444/selenium-server/core/Blank.html?start=开发者_如何学Gotrue

I am unable to figure out the reason.


i think you need the keys for your hash, eg

Selenium::Client::Driver.new(:host => 'localhost', :port => 4444, etc)
0

精彩评论

暂无评论...
验证码 换一张
取 消