Tag Info

New answers tagged

0

Can you try this and see if you still get the same error? Also rebuild your entire project to be sure. File pathToBinary = new File("C:\FirefoxPortable\FirefoxPortable.exe"); FirefoxBinary ffBinary = new FirefoxBinary(pathToBinary);


1

when I select the popup link it opens in a new frame on the same page. For webdriver, you have to explicitly move the driver to a new frame. If you can identify the frame, you can use driver.switchTo().frame() to find elements inside it. Does that help?


1

Well, I solved it, but it might not be best practice. Basically, in each test method I assign that method to a current thread variable. targetThread = Thread.CurrentThread; and then, when the user presses the stop test button, i kill the thread. works like a charm. public void haltScript() { targetThread.Abort(); } of course, i'm ...


0

Please use driver.close() and driver.quit() both in the end. driver.close – It closes the the browser window on which the focus is set. driver.quit – It basically calls driver.dispose method which in turn closes all the browser windows and ends the WebDriver session gracefully.


0

1) driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); This means that we can tell Selenium that we would like it to wait for a certain amount of time before throwing an exception that it cannot find the element on the page. We should note that implicit waits will be in place for the entire time the browser is open. This means that any search ...


0

It doesn't sound as if you need to use Selenium to download the file, just for the browser session. If that is the case, how about instead of downloading the file through the web browser, you pass the browser's session information over to an HTTP library and request the file to be downloaded? For a specific example, in Python, I would find the URL I am ...


0

As an alternative to the answer I accepted above, I'm now using the following code when I need to do this: var dropdown = Driver.FindElement(element); var optionList = new List<string>(); optionList = dropdown.Text.Split(new[] { "\r\n" }, StringSplitOptions.None).ToList(); Now I can search within the list for a string to see if it is present in the ...



Top 50 recent answers are included