selenium - How to Open negative browser url? -


i need verify if opening browser url not landing particular page. code snippet below, open performed , page displays 'couldn't open url' still exception thrown selenium

error: "error in invoking selenium commands:timed out after 100000ms".

selenium rc command

selenium.settimeout("100000"); selenium.open(url); 

how verify negative url's via selenium

to open url in web browser

string browser = "firefox"; //string browser = "chrome"; //string browser = "ie"; @test public void googlesearch() {     webdriver driver = null;     if (browser.equalsignorecase("chrome")) {         system.setproperty("webdriver.chrome.driver", "path-to-chromedriver\chromedriver.exe");         driver = new chromedriver();     }     else if(browser.equalsignorecase("ie")){         system.setproperty("webdriver.ie.driver","path-to-iedriver\iedriver.exe");         driver = new internetexplorerdriver();     }     else {         driver = new firefoxdriver();     }     driver.manage().timeouts().implicitlywait(40, timeunit.seconds);     driver.manage().window().maximize();     driver.get("http://www.google.com"); } 

Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -