selenium-firefoxdriver

Firefox WebDriver hangs waiting for page to load

爱⌒轻易说出口 提交于 2019-12-03 03:43:07
sometimes in my test done with Selenium 2.41 and tested with Firefox 28 the execution hangs waiting for page to load. This is the wait condition: int time = 30; WebDriverWait wait = new WebDriverWait(webDriver, time); ExpectedCondition<Boolean> pageLoadCondition = new ExpectedCondition<Boolean>() { public Boolean apply(WebDriver driver) { return ((JavascriptExecutor)driver).executeScript("return document.readyState").equals("complete"); } }; wait.until(pageLoadCondition); It's supposed that after 30 seconds this method will throw a TimeoutException, but it's not, sometimes hangs forever. This

Selecting WebElements with dynamically generated ids by xpath Selenium java

蓝咒 提交于 2019-12-02 21:31:35
问题 I need to select an element in a dropdown window. Every time I open the dropdown window in the site I am testing, the website randomly generates an id for that dropdown window. Previous instances of the dropdown window are visible (using Firebug) but not selectable. There is a static path but it only works when I test it with ChromeDriver, and not when I use FirefoxDriver. Locating the dynamically generated elements by class name (each instance of the dropdown window has the same class) works

“An unhandled exception of type 'System.InvalidOperationException' occurred in WebDriver.dll” error coming up

て烟熏妆下的殇ゞ 提交于 2019-12-02 15:58:05
问题 I am running a simple code to launch the Firefox browser. Running it in Visual Studio. Below is the code: IWebDriver driver3 = new RemoteWebDriver( new Uri("http://localhost:4444/wd/hub"), DesiredCapabilities.Firefox()); driver3.Url = "http://www.google.com"; Getting the error exception as: An unhandled exception of type 'System.InvalidOperationException' occurred in WebDriver.dll Additional information: Error forwarding the new session Empty pool of VM for setup Capabilities [{browserName

Can't upload file using Selenium with Python. POST POST /session/b90ee4c1-ef51-4cc0-8543-dfd76c7a151d/file did not match a known command

人盡茶涼 提交于 2019-12-02 11:28:05
I am trying to upload a file to this website from selenium import webdriver from selenium.webdriver.common.keys import Keys my_mail = "email@yahoo.com" driver = webdriver.Firefox("C:\\Users\Daniel\AppData\Local\Programs\Python\Python36-32\Scripts") driver.get("https://www.ngs.noaa.gov/OPUS/") assert "OPUS" in driver.title driver.find_element_by_name("uploadfile").send_keys("C:\\Users\\Daniel\\Desktop\\popo\\uhc30010.15d") email = driver.find_element_by_name("email_address") email.send_keys(my_mail) driver.find_element_by_name("Static").click() but I am getting this error selenium.common

“An unhandled exception of type 'System.InvalidOperationException' occurred in WebDriver.dll” error coming up

醉酒当歌 提交于 2019-12-02 09:25:30
I am running a simple code to launch the Firefox browser. Running it in Visual Studio. Below is the code: IWebDriver driver3 = new RemoteWebDriver( new Uri("http://localhost:4444/wd/hub"), DesiredCapabilities.Firefox()); driver3.Url = "http://www.google.com"; Getting the error exception as: An unhandled exception of type 'System.InvalidOperationException' occurred in WebDriver.dll Additional information: Error forwarding the new session Empty pool of VM for setup Capabilities [{browserName=firefox, version=, platform=ANY}] Can anyone please tell me how to fix this? I have done the following: I

Selenium 2.53.0 firefox bugging

大憨熊 提交于 2019-12-02 08:53:45
问题 So, when I try to open firefox like it either pops up really quickly, or it just stays there for a second until I can see it then crashes Also, I use selenium version 2.53.1 WebDriver driver = new FirefoxDriver(); driver.get("http://stackoverflow.com"); 回答1: Just like the other drivers available to Selenium from other browser vendors, Mozilla has released an executable geckodriver that will run alongside the browser. You need to download latest executable geckodriver from here and set this

Selecting WebElements with dynamically generated ids by xpath Selenium java

荒凉一梦 提交于 2019-12-02 08:07:16
I need to select an element in a dropdown window. Every time I open the dropdown window in the site I am testing, the website randomly generates an id for that dropdown window. Previous instances of the dropdown window are visible (using Firebug) but not selectable. There is a static path but it only works when I test it with ChromeDriver, and not when I use FirefoxDriver. Locating the dynamically generated elements by class name (each instance of the dropdown window has the same class) works the first time I try it but I get errors every time after that using both ChromeDriver and

Webdriver selenium,java.lang.NullPointerException,while trying to locate a Webelement

我与影子孤独终老i 提交于 2019-12-02 07:11:26
Complete code is written to fetch data from excel and login to Gmail, but while trying to do so my browser had opened and also the desired page got opened and as well as login id was picked from excel and stored in the variable sUsername, but unable to locate the xpath as- element=driver.findElement(by.id("Email")); but when I print element it holds "null", where as expected was some address of the locator id. Further by using the address of id I would had used with sendkeys to enter the email address in the text box. But the following error was displayed: java.lang.NullPointerException at

FirefoxDriver webdriver.load.strategy unstable findelements getting elements from the wrong page

此生再无相见时 提交于 2019-12-02 06:57:09
问题 I am using FirefoxDriver in an application that rapidly moves through several similar but not identical pages. To speed up the execution (I need to use FF), I set the webdriver.load.strategy property to 'unstable.' This does indeed speed things up by not completely loading pages, but I found a very strange error. In examining the file with the list of pages and the data on them, I found that some pages were matched up with the wrong data. When I debugged, everything worked fine while stepping

Setting BrowserExecutableLocation in FirefoxOptions in Selenium doesn't prevent an “Unable to find a matching set of capabilities” error

风流意气都作罢 提交于 2019-12-02 05:01:29
问题 I'm still fairly new to Selenium and am trying to create some minimally passing test cases (I guess you could call them the equivalent of a "hello world" program in a sense). I tried to create an instance of the Firefox Driver like this: var options = new FirefoxOptions() { BrowserExecutableLocation = @"C:\Program Files(x86)\Mozilla Firefox\Firefox.exe", Profile = new FirefoxProfile(), LogLevel = FirefoxDriverLogLevel.Debug }; firefoxDriver = new FirefoxDriver(options); However, when I ran