wrong number of arguments (given 1, expected 0) (ArgumentError) error selenium-webdriver-3.142.7

837 views
Skip to first unread message

ankita bansal

unread,
Mar 9, 2021, 11:43:34 PM3/9/21
to Selenium Users
Hi there

Please help me... I just updated my Ruby version to 3.0.0 and with that upgraded selenium-webdriver-3.142.7.

When I run my test I get following error:
wrong number of arguments (given 1, expected 0) (ArgumentError)
/opt/bamboo/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/bridge.rb:44:in `handshake'
/opt/bamboo/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/driver.rb:39:in `initialize'
/opt/bamboo/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/common/driver.rb:58:in `new'
/opt/bamboo/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/common/driver.rb:58:in `for'
/opt/bamboo/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver.rb:88:in `for'
/op

Titus Fortner

unread,
Mar 10, 2021, 9:00:57 AM3/10/21
to Selenium Users
Selenium 3 is not compatible with Ruby 3.
Upgrade to using the Selenium 4 beta gem, it has all the same functionality of Selenium 3, with some updates and additional functionality.

Vidhi Jain

unread,
Mar 26, 2021, 12:30:19 PM3/26/21
to Selenium Users
Hi,

I am getting error of wrong argument when connect to sauce. It is working fine at local execution.

Started getting this error when I have upgrade the ruby version from Ruby 2.3 to Ruby 3.0. Using selenium version 3.142.7 in sauce capabilities. 

Code:
Capybara.current_session.driver.browser.manage.window.maximize

Does not understand why I am getting error when only I am connecting to sauce ? Please guide me.

Thanks
Vidhi

Vidhi Jain

unread,
Mar 26, 2021, 12:30:20 PM3/26/21
to Selenium Users
Why we have beta or alpha version of selenium web driver? Is it still in testing period?

On Wednesday, March 10, 2021 at 7:30:57 PM UTC+5:30 titusf...@gmail.com wrote:

Titus Fortner

unread,
Mar 26, 2021, 2:29:41 PM3/26/21
to seleniu...@googlegroups.com
Selenium 3 is not compatible with Ruby 3. Either use Selenium 3.142.7 with Ruby 2.7 or upgrade to use Selenium 4.0.0.beta2 with Ruby 3.0.

Selenium 4 is still being developed, but most of the missing functionality is in the grid components and in new things that were not available at all in Selenium 3. You are likely to have a better experience using Selenium 4 beta than Selenium 3.142.7 at this point.

When connecting with Sauce Labs make sure you are sending properly formatted w3c capabilities (you need to be passing in Sauce specific options using `{"sauce:options" => sauce_opts}`. 

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/3c1ea963-9dcf-4557-8284-3ad46146bdfcn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages