Firefox profile with webdriver and ruby - unknown option error - ruby

Ruby 2.2.5
Upgraded Gems to the following:
-Cucumber 2.4.0
-Selenium Webdriver 3.0.0
-rake 11.3.0
-json 2.0.2
And just upgraded to Firefox 47. Installed Gecko and now I am getting the following error when trying to run in Firefox
unknown option: {:profile=>#<Selenium::WebDriver::Firefox::Profile:0x40bba78 #model=nil, #native_events=true, #secure_ssl=false, #untrusted_issuer=true, #load_no_focus_lib=false, #additional_prefs={"plugin.default.state"=>2}, #extensions={}>} (ArgumentError)
Does anyone have any ideas why?!

Related

wkhtmltopdf and heroku-20

Since the migration to stack heroku-20, wkhtmltopdf doesn't work anymore.
The PDF generation raise this error :
Command Error: /app/vendor/bundle/ruby/2.7.0/gems/wkhtmltopdf-binary-0.12.6/bin/wkhtmltopdf:48:in `<main>': Invalid platform, must be running on Ubuntu 16.04/18.04/20.04 CentOS 6/7/8, Debian 9/10, or intel-based Cocoa macOS (missing binary: /app/vendor/bundle/ruby/2.7.0/gems/wkhtmltopdf-binary-0.12.6/bin/wkhtmltopdf_ubuntu_20.04_amd64). (RuntimeError)
I have the same issue with the version wkhtmltopdf-binary-0.12.5 and wkhtmltopdf-binary-0.12.6
Ok problem sovled with the last version of the gem wkhtmltopdf
gem 'wkhtmltopdf-binary', '~> 0.12.6.5'

Ruby Selenium::WebDriver::Error::InvalidElementStateError deprecation warning

I am trying to run a script on a new server and I get the following error:
WARN Selenium [DEPRECATION] Selenium::WebDriver::Error::InvalidElementStateError is deprecated. Use Selenium::WebDriver::Error::ElementNotInteractableError (ensure the driver supports W3C WebDriver specification) instead.
So far I am not able to figure out the cause of this issue.
Modules:
headless (2.3.1) selenium-webdriver (3.142.7) watir (6.16.5)
ChromeDriver 80.0.3987.87
Any ideas / suggestions?
Thank you.

undefined method `execute_script' in page object gem

I have started to get this error when running my tests using the 1.2.2 version of the page object gem
Stacktrace
undefined method `execute_script' for <Selenium::WebDriver::Firefox::Bridge:0x00000003cbdba0> (NoMethodError)
/usr/lib64/ruby/gems/2.2.0/gems/page-object-1.2.2/lib/page-object/platforms/selenium_webdriver/element.rb:146:in `parent'
/usr/lib64/ruby/gems/2.2.0/gems/page-object-1.2.2/lib/page-object/platforms/selenium_webdriver/table_row.rb:30:in `find_index_by_title'
/usr/lib64/ruby/gems/2.2.0/gems/page-object-1.2.2/lib/page-object/platforms/selenium_webdriver/table_row.rb:15:in `[]'
It occurs when trying to get the value from a table using a method such as
left_table_element[rank][column]
NB. This had been previously working for over a year so I wonder if a new issue has been introduced?
Looking at the git blame it does seem like the line of code throwing the error in the element.rb might have been changed recently and maybe caused this regression?
The problem is due a change in Selenium-WebDriver. In version 3.0.0, the Remote::Bridge#executeScript method was renamed to #execute_script.
The Page-Object gem was updated in version 1.2.2 to use the new method. However, the gem dependencies were not updated to reflect the required version - ie Selenium-WebDriver v2.53.4 is still listed as the minimum requirement. It looks like this has already been fixed in the eventual Page-Object v2.0 release.
In the meantime, you can fix the issue by upgrading to Selenium-WebDriver v3 (assuming you do not want to downgrade Page-Object):
gem install selenium-webdriver
To fix this issue just need to update your page-object gem to 1.2.2 version
gem install -v 1.2.2 (for selenium-webdriver 3.x only)

LoadError: cannot load such file -- gherkin/formatter/json_formatter , on running command rackup ,ruby version 2.2.0 and cucumber 2.1.0

I am getting LoadError: cannot load such file -- gherkin/formatter/json_formatter , on running command rackup ,
ruby version 2.2.0
cucumber 2.1.0
os :ubuntu 15.4
this error is coming since you are using the newer version of gherkin gem where path for the gherkin formatter is changed .
,please install the compatible gherkin version as required in your app.

Symbol lookup error since upgrading to Ruby 2.2.0

I got this error, since upgrading to 2.2.0, only happened when a http request sent to puma:
puma 2.10.2 (tcp://0.0.0.0:22555): symbol lookup error:
/usr/lib/ruby/gems/2.2.0/extensions/x86_64-linux/2.2.0/do_postgres-0.10.14/do_postgres/do_postgres.so:
undefined symbol: rb_thread_select
What are the cause and how to fix this?
Downgrading to 2.1.5 fixes this problem anyway.
The pg gem prior to version 0.14.1 uses the method rb_thread_select. This method was removed in Ruby 2.2. According to their history file, version 0.15.0 released in March 2013 does not use it anymore:
== v0.15.0 [2013-03-03] Michael Granger <ged#FaerieMUD.org>
[...]
Enhancements:
- Make use of rb_thread_fd_select() on Ruby 1.9 and avoid deprecated
rb_thread_select().
[...]
So you may be using an old pg gem. Upgrading this gem to at least 0.15.0 should fix your issue.

Resources