Having trouble with selenium-webdrivers on Ubuntu. Everything seems to be working well except for Firefox, which has JavaScript disabled. When visiting a website that requires JavaScript, I get the noscript error message displaying "
<noscript>Javascript is required ....
".
Is there a way to enable JS on Firefox in Ubuntu or is this a failure of Selenium where I need to modify the driver?
Code:
require 'rubygems'
require 'headless'
require 'selenium-webdriver'
@headless = Headless.new
@headless.start
@driver = Selenium::WebDriver.for :firefox
@driver.navigate.to 'URL'
... actions
@headless.destroy
The website seems to navigate using HTTP headers and Ajax.
If anyone has any ideas, I would appreciate it.
Everything works fine on my development machine (Windows 10).
Regards,
Mat
EDIT
With newer modules, you will need Firefox 65+ as it comes with its own headless module. Now everything is running smoothly and fast. Also, make sure to use the latest Geckodriver as it may not work with older versions of Firefox.