ITest with different browser version via webdriver - selenium

I'm starting to write a test scenario with selenium web driver and test it via different firefox and IE versions. So, I downloaded GeckoDriver and selenium webdriver itself.
The question is, what version of selenium webdriver, firefoxdriver (gecko driver) and IE driver in order to test my scenario in different browser versions?
for example firefox since version 35 and IE since version 7.
Is there any references to see which firefox version works with which gecko driver and webdriver versions?

this will helps you
https://www.browserstack.com/automate/capabilities
better way is to check change log in http://www.seleniumhq.org/download/
exp: for gecko https://github.com/mozilla/geckodriver/blob/release/CHANGES.md
and webdriver https://raw.githubusercontent.com/SeleniumHQ/selenium/master/java/CHANGELOG

Related

Which Selenium JAR is compatible with Mozilla Firefox version 52 or, latest version

Previously I was using Selenium version 2.53 with Firefox version 46.1. But now Firefox is updated and I am trying to do with updated version.
So, respond me about "which Selenium JAR is compatible with Mozilla Firefox version 52 or, latest version"
To work with Selenium 3.4.0 along with latest gecko driver v0.16.0 & Mozila Firefox 53.0, you need to download the gecko driver from here and save it. Mention the absolute location of gecko driver in your code as follows:
public void sampleMethod()
{
System.setProperty("webdriver.gecko.driver", "C:\\your_directory\\geckodriver.exe");
WebDriver driver= new FirefoxDriver();
driver.manage().window().maximize();
driver.get("http://your_url.com");
}
No need to Update the selenium jars since your existing tests may not work properly with new selenium jars. Use the gecko driver to interact with firefox.
Add the path to gecko executable before initiating the Webdriver.
System.setProperty("webdriver.gecko.driver", "C:\\your_directory\\geckodriver.exe");

driver.switchTo().alert().sendKeys("Hello") not working for latest chrome driver- Selenium Webdriver -java

driver.switchTo().alert().sendKeys("Hello")
The above code for prompt is not working for latest chrome driver with selenium webdriver -java. It didn't throw any error. Except sendkeys all other actions accept(),dismiss() , getText() is working well. I have used ChromeDriver 2.29, selenium-3.3.1, Chrome Browser - Version 56.0.2924.87.
google chrome
Version 59.0.3071.109
chrome driver 2.30
selenium 3.4
i have this version for chrome.
driver.switchTo().alert().sendKeys("Helllo")
is working properly.
This is purely a display issue and the input of sendKeys(...) will be sent after you accept the Alert.
See also the answer in this Chromium issue:
https://bugs.chromium.org/p/chromedriver/issues/detail?id=1120#c11

Does browser support WebDriver or does WebDriver support browser

Is it the browser job to support WebDriver or is it WebDriver job to support each browser?
I mean if there is a new release of Chrome does this mean that WebDriver works right away because the support is included in the new Chrome release?
Or is WebDriver support added later by the developers of WebDriver?
To run selenium webdriver in Chrome browser, we need to take the help of ChromeDriver which is a separate executable that selenium webdriver uses to control chrome. ChromeDriver is supported by the Chromium team, ChromeDriver is a standalone server which implements WebDriver's wire protocol for Chromium.
http://www.seleniumeasy.com/selenium-tutorials/how-to-run-webdriver-in-chrome-browser
Yes, Webdriver made changes later that's the reason new jars of selenium launches so rapidly.
Hope it will help you :)

Suitable Chrome driver to use with selenium tests

I was wandering since there is many chrome drivers available on the nuGet Packages Manager, which one is fitting the best with Selenium tests, does it make any difference at all?
WebDriver ChromeDriver
WebDriverChromeDriver
Selenium.WebDriver.ChromeDriver
etc...
I'm using for my >30K lines of code (and 6 different web-sites) UI test project the
WebDriver ChromeDriver
with version 26.14.313457.1, it's a separate executable that WebDriver uses to control the Chrome browser. Again it requires Chromium/Google Chrome to be installed.

Why do we need IEDriver and ChromeDriver but no Firefox Driver?

I have small doubt.
Why do we need IEdriver and Chrome Driver running selenium scrits in IE and Chrome but we do not need a firefox driver to run the script?
Is there any reason for the same?
This is because of the Native Browser approach used in WebDriver.
Each and every browser uses different JS Engine.
All drivers [Chrome Driver, IE driver, etc.,] are built based on the special JS Engine used by each browser.
Selenium offers inbuilt driver for Firefox but not for other browsers. [Not sure it may happen in future, since TestNG and JUnit library files are a part of Selenium-standalone-server right now]
Straight from a google search for FirefoxDriver, the official documentation states:
Firefox driver is included in the selenium-server-stanalone.jar available in the downloads. The driver comes in the form of an xpi (firefox extension) which is added to the firefox profile when you start a new instance of FirefoxDriver.
External drivers are the preferred process by the Selenium developers. They allow the driver versioning to be tied more closely to the browser than to Selenium, and they can be supported by the browser authors (e.g., ChromeDriver, OperaDriver). There is a long-standing plan to replace FirefoxDriver with a Mozilla-supported driver based on Mozilla's "Marionette" architecture.
Firefox driver is already included in the selenium-server-standalone.jar package.