WebDriverManager Java download matching version on device - java

I am using WebDriverManager to install the drivers. However, the setup method seems to install the latest version and not the matching version on my device.
Although they differ, it seems to still work. Is it needed to specify the version to be more exact (not sure on this)?
If I wanted to specify the version, how can this be achieved?
WebDriverManager.chromedriver().setup();
This installs the latest chrome driver (say 105.1.3 but my device might have 105.1.1 as an example).

The version of Driver that you want Webdrivermanager to setupcan be configured like below, i have set to 102.0 which is what my device has installed not the latest 105
You can extract the Installed Chrome Browser version, pass it in driverVersion below to use the same
WebDriverManager.chromedriver().driverVersion("102.0").setup();

The solution is setup() will match the matching browser version (I found it in the docs after here in 3.1.1

Related

Alternative to deprecated chromedriverchromemapfile

I'm trying to pass in the Andriod/iOS version through our test case file (.csv) and have the in-house framework download the appropriate chromedriver automatically. I looked into chromedriverchromemapfile but it looks like that is a deprecated feature for UIAutomator2.
Currently, we have to manually download the appropriate chromedriver and add it to the /bin/ directory. I'm using Appium 1.13 and UIAutomator2, would like to be able to support 2/3 previous versions of each Android/iOS OS.
Automatic discovery of compatible Chromedriver
Beginning with Appium 1.8.0, Appium is able to pick the correct Chromedriver for the version of Chrome under test. While Appium only comes bundled with the Chromedriver most recently released at the time of the Appium version's release, more Chromedriver versions can be downloaded and either placed inside the Appium installation (not recommended since upgrading Appium will remove them) or in a custom location, which can be indicated to Appium with the chromedriverExecutableDir desired capability. This capability is the absolute path to the directory in which you have placed one or more Chromedriver executables.
As well, since new versions of Chromedriver may be available that were not when an Appium version was released, a custom mapping of Chromedrivers to the minimum Chrome version they support can be given to Appium through the chromedriverChromeMappingFile desired capability. This should be the absolute path to a file with the mapping in it. The contents of the file need to be parsable as a JSON object, like:
{
"2.42": "63.0.3239",
"2.41": "62.0.3202"
}
Link to the source:
http://appium.io/docs/en/writing-running-appium/web/chromedriver/index.html
Expected:
Looking to have the framework automatically download the compatible chromedriver before each script execution.

How to give FirefoxDrive and gecko driver in qaf applicaiton.properties to do execution in firefox

I was trying to execute my QAF framework in my local Firefox( Version 61) and I need to know how to call out firefox browser from QAF application.
driver.name=geckodriver
webdriver.gecko.driver = C:/DRIVERS/geckodriver.exe
Above one did not work. Do I need to give driver.name=firefoxDriver. Even then it did not work on QAF. Please help.
You need to set following properties for firefox:
driver.name=firefoxDriver
system.webdriver.gecko.driver=C:/DRIVERS/geckodriver.exe
You also can provide relative path like below:
system.webdriver.gecko.driver=servers/geckodriver.exe
In above case driver executable assumed under /servers.
After setting above properties if you are facing any issue then you need to check geckodriver and selenium webdriver version is compatible with the version of firefox. If you are updating selenium version above 3+ make sure to use selenium-support version 3.0.0 or use qaf latest version (2.1.14-RC1 is the latest at present).

Jxbrowser upgrade to 4.3 - version check

I was asked by a vendor to upgrade JxBrowser on 1 of our machines to 4.3.
How do I find out which version we currently have? and
How to upgrade to version 4.3
In addition this seems to be used mostly for Chrome and so do we still need to do this if we dont use chrome there?
Thanks.
Currently used JxBrowser version can be known by simply looking which version of JAR are you using and the latest jar is jxbrowser-6.8.jar which means they are running on jxbrowser version-6.8. To upgrade to a newer version download the latest jars, include them in your class path and rebuild your application. Check their site for further clarifications and licencing.

Webdriver: Firefox driver doesn't work anymore

I created webdriver project with maven. Everything was fine, but one day my tests throw an exception while they running in Firefox. My Firefox version is 11 at this moment.
In my pom file i tried to change versions, but tests still don't work:
-Error communicating with the remote browser. It may have died.
Or
-Cannot perform native interaction: Could not load native events component.
Please, help with this issue.
I would recommend using Firefox 3.6, 9 or 10, because WebDrivers 2.19.0 and 2.20.0 (today's version) are not yet compatible with Firefox 11.
The official changelog says that version 2.19.0 enables native events in FF10. Also, the version 2.15.0 announces support for FF up to and including FF11. Seems that something got wrong there :). Downgrade to FF10 or similar and you should be good.
I upgraded to Selenium WebDriver 2.25.0 and my tests worked again.

JNLP Applet loading on Safari or Firefox 3.6

I'm trying to load an applet using JNLP. Things work fine on every browser I've tested, except for Safari (tried on Safari 5.0.3 on OSX Snow Leopard).
This seems a Safari related bug, because even the JNLP applet used for testing in the plugin2 page on Oracle doesn't seem to be working, as Safari tries to load "Ignored.class" instead of looking at JNLP file.
Does anyone know a workaround for this issue?
Ok, so after a lot of tinkering, it seems that the reason for this behavior lies in the plugins installed on Safari (and Firefox 3.6, it seems).
Instead of working with the latest Java Plugin 2 NPAPI, it's using some older plugin. So the real fix is to remove that older plugin from Safari: Go to /Library/Internet Plug-ins and remove JavaPluginCocoa.bundle (also, remove it if you have it on ~/Library/Internet Plug-Ins).
This are the same directions described in this Apple Knowledge Base article, although for different reasons.
When you do this, Safari will use the new Java Plugin 2, and will work exactly as other browsers using the newer plugin (namely, Chrome or Firefox 4, unsure about Opera. For Firefox 3.6 you'll have to do a similar thing, but following the steps in this bug report)

Categories

Resources