Latest Watir version supports Edge? - ruby

I see WATIR supports Edge browser automation in official website. But when I tried to run my existing suite on Edge after setting the path for MicrosoftWebDriver.exe in environment variables I am facing the below error .
Selenium::WebDriver::Error::WebDriverError: unable to connect to
MicrosoftWebDriver localhost:17556
Below are my version details.
Watir - 6.8.4
Ruby - 2.2.6
Windows 10 64 bit
I even tried using webdrivers gem of titusfortner. But, no success webdrivers gem is not downloading MicrosoftWebDriver.exe into .webdrivers folder in my users directory.
I wanted to know whether I have anything wrong in my set up to trigger edge browser. Thanks in advance

Got the issue resolved. We have to download the right version of Microsoft WebDriver.
Go to Start > Settings > System > About and locate the number next to OS Build on the screen. This is your build number. Having the correct version of WebDriver for your build ensures it runs correctly.
Get the right version of driver at WebDriver - Microsoft Edge Development

Related

Tile server for mapbox

I've tried to get this running with versions 2.14.4 and 2.15.2 without success I can run on version 2.13. I'm trying to figure out the issue, step one is as below;
In both versions this is what I see after installing the vectortile extension and restarting but this differs from the screengrab shown in the documentation. So my question is whether the documentation image is out of date or my install has not worked (2.14.4 with Vectortile extension 2.14.4).
I resolved the bug which means I can confirm that the above screenshot does mean that the vectortiles extension has installed properly

Ruby Webdrivers Gem Cannot Reach Site

I am using the webdrivers gem for Ruby (not selenium webdriver) https://rubygems.org/gems/webdrivers/versions/3.2.0
I can get the gem to update chrome fine, it places it in webdrivers new directory and sees the version of the chrome driver. I only used the update and latest methods on Webdrivers::Chromedriver. My issue is when trying to get the Webdrivers::Geckodriver installed (firefox). I get the error message: Cannot reach site. The documentation is a little lacking, does anyone know the proper setup for firefox? or why i get this error?
First, update to the latest version, there are a couple minor bugs that were fixed since your version.
You should only be seeing that error if the gem can't access the github site where mozilla stores its release binaries. So very likely a temporary issue.
If it isn't already working again, set Webdrivers.logger.level = :debug to get more info about what is happening, and we can debug it.

Getting Marionette/Geckodriver up and running with Protractor

So I've been having an issue getting my Protractor/Jasmine tests running in FireFox. I've been aware of the version issue from FireFox that doesn't support selenium angular/bootstrap etc etc and that has been my issue to date.
I was informed to try geckodriver but really can't find any good resources on how to set it up using protractor and jasmine. Or even which driver is the appropriate one to use.
Recently I've tried the following to get FF back up and running (all resulted with no luck):
Downgraded FireFox to as low as 33.x.x while keeping
Protractor/Jasmine at current versions (4.0.5 and 2.51 respectively).
Downgraded Protractor to as low as 3.0.0 while keeping FF at current version (47.0.1)
Downgraded both Protractor and FF to the lowest above versions.
Used Latest Version of FF 47.0.1 with lesser versions of Protractor.
Used Latest Version of FF 47.0.1 with latest version of Protractor 4.0.5
Used directConnect: true and directConnet: false
So I guess now I have one of two questions:
1. Could somebody post a protractor config snippet using the geckodriver / or direct me to a walk-through of this.
2. Inform me of a work around or a working solution (versions of both webdrivers/protractor/jasmine, etc).
If you need to see errors or my config file or anything at all please just simply comment and I'll be happy to revise.
There was a period of time around Firefox v46 and Selenium v2.5x where things were incompatible due to changes to the firefox web-driver. The issues were quickly addressed by the community.
The issue with Protractor lies with the webdriver-manager being a bit out of date with the updates. As per discussions on github, they are aware of this, and a fix is coming.
The workaround in the meantime is to manually update the outdated pieces.
Here's how you'd do it, run
webdriver-manager update
This will give you the paths to all the components the webdriver-manager handles for you.
Navigate to the selenium-server-standalone.jar file (protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-2.53.1.jar in my case) and replace this with the latest selenium standalone jar (anything v3+ should be good). Make sure to retain the exact filename as the previous jar file. (link: http://www.seleniumhq.org/download/)
Repeat the process to get the latest Gecko web-driver. Uncompress and replace the current version. (link: https://github.com/mozilla/geckodriver/releases)
Now run your tests through protractor and you should be good with the latest version of Firefox.
Good luck and happy testing :)

Selenium::WebDriver::Error::JavascriptError: arguments[0] is undefined

After seeing that this is a problem with Firefox 35, I installed 34 and ran bundle exec rspec and my tests ran perfectly. But when I tried running it again, it somehow opened the newer version of Firefox as I get the following error again when I run my test suite:
Selenium::WebDriver::Error::JavascriptError: arguments[0] is undefined
Is there a way to guarantee that I don't have Firefox 35 installed that Selenium is somehow finding and opening? I know that Firefox 34 is the version of the Firefox in my Applications directory, but I am not certain there isn't a replica copy of a newer firefox that Selenium is grabbing when launchy is used.
This is a known issue with the current release of selenium.
As #janders223 points out in a comment on another question, the temporary workaround for a Ruby project is to use the dev version of the selenium-webdriver gem.
Modify your Gemfile to specify the latest dev version (as of this writing):
gem 'selenium-webdriver', '>=2.45.0.dev3'
Then run bundle install.
So, this is incredibly basic, but I found that when I had installed Firefox 34 via the dmg listed here, because I had naïvely just dragged and dropped the Firefox icon into the Applications folder clicking "Yes, I would like to overwrite the extant application" I hadn't ensured all of the newer files of Firefox 35 weren't available for Selenium to use, which Selenium availed itself of without me knowing which version it was choosing.
I simply uninstalled Firefox completely from my the mac by dragging it into the Trash, & reinstalled the Firefox 34 dmg.
N.B. Also if you run into this issue, when you download Firefox 34, you have to go to Firefox >Preferences>Advanced , click the Update tab, and choose "Check for updates, but let me choose whether to install them" or "Never check for updates" to prevent Firefox from automatically updating to Firefox 35 and therefore messing with your Selenium test suite the next time you run them again.
This problem also appearing in python selenium package nowdays. it is possible, that "arguments" appearing in code eventually. It can be solved simply by announsing all arguments at start in different var variables.
Approved answer showing this technique.

Firefox 3.6 update breaks selenium

I'm unable to run any selenium tests since I updated Firefox to 3.6. Is it happening just to me or is it everybody?
Error message I get is: Could not start Selenium session: Failed to start browser session
This is in Windows Xp.
Ok. Found the problem. My Netbeans was using version 1.0.1 which did not support 3.6.
This fixed it: http://geekswithblogs.net/thomasweller/archive/2010/02/14/making-selenium-1.0.1-work-with-firefox-3.6.aspx
You can also try the extension "Nightly Test Tool" before a extension officially supports a new released version.
Selenium 1.0.3 was updated to work with Firefox 3.6 so suggest updating your version instead of going in and hacking the jar file.
You can get the latest version from http://code.google.com/p/selenium/downloads/list

Resources