selenium icon indicating copy to clipboard operation
selenium copied to clipboard

implicitly_wait(30) error: Not a Number

Open GrandmasterGrogu opened this issue 9 years ago • 11 comments

Meta -

OS: OpenSUSE 12

Selenium Version: 3.31 (Python) and the latest geckodriver .15 I think

Browser: Firefox

Browser Version: 50.0.2

Expected Behavior -

implicitly_wait(30)

The expected behavior is that it would proceed and do the implicit waits. I upgraded from Selenium 2.something and Firefox 32 to Selenium 3.3.1 and Firefox 50

Actual Behavior -

It throws an error saying "Not a Number"

Steps to reproduce -

The steps may be difficult to reproduce as it is a highly specialized environment.

  1. Opensuse 12 with Python 2.7 installed and Selenium 3.3.0-1 rpm
  2. In script, load Firefox driver with FirefoxBinary class. This is because for some reason there is a path permissions error otherwise. ''' from selenium.webdriver.firefox.firefox_binary import FirefoxBinary ... binary = "/usr/bin/firefox" driver = webdriver.Firefox(firefox_binary=binary) driver.implicitly_wait(30) '''

Comments

A workaround I am doing is using the explicit waits and time.sleep(x).

GrandmasterGrogu avatar Mar 15 '17 19:03 GrandmasterGrogu

Even am facing the same issue Selenium webdriver-3.3.0 Firefox -49.0.2(x64) latest geckodriver-0.15.0 while executing the below script, driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(20); getting error as An exception of type 'System.InvalidOperationException' occurred in WebDriver.dll but was not handled in user code

Additional information: Not a Number

LathaSan avatar Mar 17 '17 07:03 LathaSan

In my case, below error happens when calling "driver.implicitly_wait()". selenium.common.exceptions.WebDriverException: Message: Missing 'type' parameter

Selenium webdriver: 3.3.1 Firefox: 52.0.1(32bit) Python: 3.6.0 Latest geckodriver-0.15.0

It doesn't happen in webdriver 3.0.2. To avoid this error, I've revert the following commit regarding "implicitly_wait" in my environment. https://github.com/SeleniumHQ/selenium/commit/01e76ca8f0ade21999f3ee0c9113ed3cfad4fe96

yamamototakas avatar Mar 20 '17 05:03 yamamototakas

I also have this error Not a Number with: Selenium Webdriver: 3.3.0 Firefox: 50.0.2 (32 bit) C#, Windows 10, framework 4.5.2 Latest geckodriver-0.15.0

When using Firefox: 52.0 ESR (32 bit) the issue doesn't appear and the implicit wait works fine.

I've tried using the depricated ImplictyWait() and the ImplicitWait settings, but both behave the same with FF 50.0.2.

Result StackTrace:	
System.InvalidOperationException: Not a Number
   at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
   at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.Remote.RemoteTimeouts.ExecuteSetTimeout(String timeoutType, TimeSpan timeToWait)
   at OpenQA.Selenium.Remote.RemoteTimeouts.set_ImplicitWait(TimeSpan value)

Raatiw avatar Mar 20 '17 10:03 Raatiw

I'm also getting the same error.

Mac OS Sierra (10.12.3) Python 3.4.3 Firefox 45.7.0 geckodriver 0.15.0 selenium 3.3.1

 File "<Home Directory>/virtualenvs/<my virtual env>/lib/python3.4/site-packages/selenium/webdriver/remote/webdriver.py", line 691, in implicitly_wait
    'implicit': int(float(time_to_wait) * 1000)})
  File "<Home Directory>/virtualenvs/<my virtual env>/lib/python3.4/site-packages/selenium/webdriver/remote/webdriver.py", line 238, in execute
    self.error_handler.check_response(response)
  File "<Home Directory>/virtualenvs/<my virtual env>/lib/python3.4/site-packages/selenium/webdriver/remote/errorhandler.py", line 193, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Not a Number

prabhukhalsa avatar Mar 22 '17 19:03 prabhukhalsa

This is because geckodriver 0.15 implemented the w3c endpoint for timeouts. Also note that geckodriver 0.15 requires Firefox version 52 for certain functionality (such as timeouts).

@alexxgathp, @PWithaarImproveQS You'll need geckodriver 0.14 for Firefox 50, and downgrade selenium @LathaSan you'll need the same for 49 @yamamototakas you should not be getting the issue if you are in fact using FF52, selenium 3.3.1, and geckodriver 0.15 @prabhukhalsa I'd suggest using the legacy firefox driver for 45.7.0, if you don't want to then you will need to use geckodriver 0.14 (and downgrading selenium)

lmtierney avatar Mar 22 '17 20:03 lmtierney

Thanks, I upgraded Firefox and the error is gone.

prabhukhalsa avatar Mar 23 '17 17:03 prabhukhalsa

Thanks, it worked with geckodriver 0.14 and Selenium 3.0.0-1.

GrandmasterGrogu avatar Mar 31 '17 19:03 GrandmasterGrogu

Thank you. It's working now with selenium 3.3.1, and geckodriver 0.15. It's due to old geckodriver unexpectedly used.

yamamototakas avatar Apr 01 '17 01:04 yamamototakas

Thanks, I also had this issue and got solved by upgrading to geckodriver .15.

rbante avatar Jul 10 '17 03:07 rbante

This issue is back on latest Firefox 60.0.1, Gecko 0.20.1 and latest selenum by this date. Seems like gecko developers not working on weekends.

ngreyes avatar Jun 09 '18 02:06 ngreyes

@ngreyes this issue has been closed.. The root cause was an incorrect configuration by the user which was fixed by upgrading. If you are experiencing a problem and believe it is an actual issue with Selenium code, please file a new issue with full details.

Seems like gecko developers not working on weekends.

This is the selenium issue tracker, not geckodriver. I don't see how working weekends would have any impact on an issue that was closed several months ago in a repo they don't own or maintain.

cgoldberg avatar Jun 09 '18 15:06 cgoldberg