Will WebdriverIO work with Selenium 3.X - selenium

I've just started learning WebdriverIO So I have quick question. On their github repository I have seen older version of chrome & firefox. So will WebdriverIO work with updated Chrome version e.g 62.x or Firefox with 47.x ?
Also will it work with selenium 3.x ?? I have heard that its only has a support for selenium version 2.x??
Thanks

The only difference between Selenium 2 & Selenium 3 is that they renounced the old Selenium RC architecture and now they are solely implementing the Webdriver W3C Standard, which I highly recommend you read.
Renouncing Selenium RC means that there is no backwards compatibility between Selenium 1 and 3, Selenium 2 being a middle way to ease the migration to the new Webdriver API implementation.
You should have absolutely no problem running with Selenium 3.x.
That being said, I am speaking out of experience (going for second year with a WebdriverIO-based framework). I never had any major problems with WebdriverIO and the main issues you'll encounter are the following:
driver teams (gheckodriver, chromedriver, etc) not implementing the Webdriver standard correctly (just file a BUG, or keep a lookout for already opened issues related to your problem on their respective GitHub Issues page);
major browsers having switched to a more aggressive release schedule will sometimes push new features not tackled by the equivalent driver, thus by updating, you might end up with failing checks;
deprecation and/or lacking/limited functionality: the guys working on WebDriver will cut and add features in accordance with how they see the progression of web-apps automation, so you will always have to switch to some new methods/approaches/best-practices every now & then.
!!! Note: all this free-software (Selenium, WebdriverIO, etc.) you're enjoying is mostly produced by a
handful of people that sacrifice their free/spare time to deliver it. It's not their job to deliver BUG-fixes and deploy like Google does with Chrome (every six weeks).
So have patience & if you can, contribute! :)

Related

How to setup Selenium 4 for old Chrome version?

By some project reasons I have to use Selenium 4 (4.0.0-rc3) and Chrome version 71.
Of course the current chromedriver (version 94) doesn't work with old chrome.
I have downloaded the source code of chromium project for debugging and try to understand how actually driver works with selenium. Probably I will try to make my own driver version but at this moment it seems like an inefficient solution.
I am really stuck with this and will be happy to get any advice.
Is it possible just to configure driver by capabilities (or any parameters) for working with old chrome?
The Chrome version you're targeting Chrome 71 is already deprecated. Using Selenium 4 with this much obsolete version of Chrome will not work and I think apart from creating your own code piece, there is nothing much you can do.
Using such an obsolete piece of software, in this age of internet, will open a pot of bugs for you, and if you use this to connect to internet, then chances are people may exploit any hidden security vulnerabilities to attack your application.
I would strongly suggest you to talk within your project team to use an updated version of Chrome.
ChromeDriver 2.46 will work with Chrome 71.

Selenium performance with InternetExplorerDriver and IE11

I am facing a very slow response when running my scripts on IE11. Sometimes, I get FocusWindowsClosed, ElementIsNotClickable. I have changed the zoom settings for all zones, created feature BFCACHE for IE in feature control, added capabilities into my code but nothing works for me. If anyone has any idea why I am facing this issue. Do i need to downgrade window or IE versions? I have also downloaded the same version of selenium client server with same IEDriver which is (3.8.0).
To start with, Selenium v3.8.0 of 2017-11-30 is more then 2 years older. Even the error trace logs would be difficult to debug. So as per best practices you may like to:
First of all, the fact that ...64-bit IEDriverServer executable populate the input fields with the character sequence very slowly as compared to 32-bit IEDriverServer executable.... is a known issue.
You can find a detailed discussion in IEDriverServer sends text very slowly using Selenium to the search field
Ensure the Internet Explorer Protective mode setting are properly configured.
Ensure the Zoom level is properly configured.
Ensure ignoreProtectedModeSettings is properly confugured.
Ensure setting up selenium to work with internet explorer.
Ensure FEATURE_BFCACHE is properly confugured.
Upgrade Selenium to current levels Version 3.141.59.
Upgrade IEDriverServer to latest IEDriverServer v3.150.1 level.
Note: As per best practices as Selenium Client and InternetExplorerDriver are released in sync and you must try to use both the binaries from the same major release.
Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
Execute your #Test.
Always invoke driver.quit() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.
tl;dr
A couple of references:
Internet Explorer 11 getting stuck randomly while executing tests through IEDriverServer and Selenium
HTTP Status: '500' -> incorrect JSON status mapping for 'timeout' (408 expected) while clicking element with IEDriverServer Selenium and Java

how to detect selenium/webdriver browsing on my site

Does anyone know how to detect selenium/webdriver browsing on my site?
I don't want to block them, just detect them.
I saw this question:
Can a website detect when you are using selenium with chromedriver?
But trying all of these on latest version didn't seem to work.
Any body knows anything else?
P.S. please don't leave answers/comments of "dont block"/"you are looking in the wrong place" - I am fully aware of what I'm asking and what will be the business logic to use it.
-- EDIT --
Things I have tested from the link above:
detecting cdc_asdjflasutopfhvcZLmcfl_ key on elements, mostly on window and document but some other elements we have across the entire site.
Searching for window.navigator.webdriver always returns undefined instead of true (tested on both chrome and firefox although only firefox said to support it)
tested the script from this answer: https://stackoverflow.com/a/45814390/1593987
All tests were done using latest selenium, browsers (firefox and chrome), and latest webdriver plugins. for now only on windows, but will probably test ubuntu as well.
In recent versions of Selenium WebDriver it's handled on a spec level.
There is a read-only JS property - navigator.webdriver which is true in case webdriver is used to control browser.
Checked with Chrome v73 - returns true.
References:
Spec - https://w3c.github.io/webdriver/#dom-navigatorautomationinformation-webdriver
Firefox - https://developer.mozilla.org/en-US/docs/Web/API/Navigator/webdriver
Chrome - https://www.chromestatus.com/feature/6216034532982784

What are the benefits of using Marionette FirefoxDriver instead of the old Selenium FirefoxDriver for a Selenium tester?

Last weeks there has been a lot of noise about this new FirefoxDriver called Marionette. To use Firefox with Selenium, we used to use the "old" Selenium FirefoxDriver. From Firefox 48.0 onwards it is going to be required to use this new FirefoxDriver developed by Mozilla.
I understand it is required to change to that direction to get every browser supports and develops its drivers and to get drivers independent of Selenium. Besides, it is supposed if Mozilla develops its own driver, it will be faster and easier to fix issues and to develop features.
My question is, for those who create automated tests using Selenium framework, is there any benefit of using Marionette instead of the "old" Selenium supported FirefoxDriver? _(Such as a better performance, a better compatibility...)
The main advantage for using the Mozilla-provided, Marionette-based Geckodriver solution is that it works for versions of Firefox 48 and higher. The legacy driver provided and maintained by the Selenium project doesn't work for Firefox 48 or higher, and will never work for those versions of Firefox.
The legacy driver is implemented as a Firefox extension. This extension is installed in the profile used by the driver when WebDriver launches Firefox. Firefox 48 introduced two new features that disabled this browser extension. The first is the so-called "electrolysis" feature, or multiprocess Firefox. Electrolysis changes the way extensions have to deal with the browser in ways the Selenium team has not taken the time to fully understand.
The second, more important requirement is that all browser extensions must be signed by Mozilla before the browser will allow them to load. This latter feature has been in Firefox for several versions, but beginning with 48, it can no longer be disabled. The WebDriver browser extension introduces several valid security concerns for the Firefox browser, and as such, will not be signed by Mozilla's security team. This, in turn, renders the extension inoperable, and thus Selenium can no longer communicate with Firefox. The Marionette-based solution, being developed and maintained by Mozilla in the first place, is blessed by them for use in automating Firefox, and as such carries a commitment that it will continue to work with future versions moving forward.
So the primary benefit of using Marionette with Firefox 48 and higher is that it will work, whereas other solutions won't.

Run Geb tests with chromeDriver without opening the browser

I want to run my Geb specs with chrome driver without having to watch the tests on the browser? can this be done?
P.D.: I know I can use the HtmlUnitDriver, but this driver sometimes gives my errors (caused mainly by timeouts) that the chrome driver don't.
There is currently no way to do this with Chrome, Safari, Opera or FireFox, however there are multiple options you can do. First is to pipe the "window" into a virtual frame buffer (if you're using Linux). This process will pop open the browser, only in memory. I talk about this in my blog post (http://www.ensor.cc/2011/05/maven-javascript-unit-test-using.html) during the maven pre-integration phase
The other option is to use the brand new GhostDriver. GhostDriver is a WebDriver implementation of PhantomJS which is a headless WebKit. This is WAY better than HtmlUnit but still has some features being built out. GhostDriver is currently not in Maven Central, so you will need to manually add it to the common repository. You can then use it as a WebDriver. This has worked for me with moderate success (90% of my test cases dropped in without any changes needed).
Read this first: http://blog.ivandemarino.me/2012/12/04/Finally-GhostDriver-1-0-0
Then refer to the GitHub README and code: https://github.com/detro/ghostdriver