Gradle Dependency for BigQuery JDBC Driver - google-bigquery

I can download a zip file for BigQuery JDBC driver from https://cloud.google.com/bigquery/docs/reference/odbc-jdbc-drivers#how_do_i_get_support_for_these_drivers but I want a maven or Gradle dependency for this driver.
Is this driver available a a gradle/maven dependency?

Related

Chromedriver versions are labelled differently in chromium website and maven repository. Which one to consider for chromedriver?

I see chromedriver is available on https://sites.google.com/a/chromium.org/chromedriver/ and also on https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-chrome-driver.
However the versions are different in both cases.
In chromium website, it is mentioned as Current stable release: ChromeDriver 84.0.4147.30
In maven repository, it is mentioned as 4.0.0-alpha-6 as latest artifact.
Question: What is the difference between both and which one should be included as a project dependency for chromedriver.exe ? I am using a selenium java testng project.
You are partially correct as they are different.
The ChromeDriver you see at ChromeDriver - WebDriver for Chrome is the executable binary which we use most commonly as in:
Java:
System.setProperty("webdriver.chrome.driver","C:\\WebDrivers\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.get("https://www.google.com/");
Python:
from selenium import webdriver
driver = webdriver.Chrome(executable_path=r'C:/path/to/chromedriver.exe')
driver.get("https://www.google.com/")
Where as the installation of Selenium libraries for Selenium-Java clients can be done using maven as well just by adding the selenium-java dependency in your project pom.xml which would support running your automation project with all Selenium supported browsers:
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.X</version>
</dependency>
But if you want to run tests only in a specific browser, e.g. Chrome, you can add the Chrome specific dependency in the project pom.xml file as follows:
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-chrome-driver -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>4.0.0-alpha-6</version>
</dependency>
The artifacts within Selenium Chrome Driver is the Selenium bindings specifically for the ChromeDriver and google-chrome combo.
To understand these we need to first understand following:
ChromeDriver is a standalone server that implements the W3C WebDriver standard.
https://chromedriver.storage.googleapis.com/index.html is location of executables from google.
WebDriver is an open source tool for automated testing of webapps across many browsers. It provides capabilities for navigating to web pages, user input, JavaScript execution, and more.
https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-chrome-driver is location of mvn dependences to interact with ChromeDriver executable. So have selenium-chrome-driver ChromeDriver class
: A WebDriver implementation that controls a Chrome browser running on the local machine.
Some more good read links:
What we have in selenium-chrome-driver https://www.javadoc.io/static/org.seleniumhq.selenium/selenium-chrome-driver/4.7.2/index.html?org/openqa/selenium/chrome/ChromeDriver.html
WebDriver commands https://chromium.googlesource.com/chromium/src/+/master/docs/chromedriver_status.md
Change logs for JAVA in selenium versions https://github.com/SeleniumHQ/selenium/blob/trunk/java/CHANGELOG

Where can we find the Selenium version compatible versions of GeckoDriver

Earlier I used this method to add gecko driver:
System.setProperty("webdriver.gecko.driver", "/home/boo/Desktop/java/geckodriver-v0.20.1-linux64/geckodriver");
but the new update (https://selenium.dev/)
https://selenium.org/ --> https://selenium.dev/
Now it redirects so I have no idea how can I download , when I download it saves as .nupke I download from here
selenium.webdriver.geckodriver.0.26.0.nupkg
How can I use this .nupkg?
And there is other 4 method available
package-manager
dotnet-cli
package-reference
paket-cli
I'm using Java Maven for automation in those 4. Which one I have to choose and how can i setup?
PS: earlier I downloaded zip file and extracted and used it
Selenium and GeckoDriver are seperately maintained and published. You can download the required version of GeckoDriver from Releases - mozilla/geckodriver page.

how to import the jdbc driver for sql server

Can any one support me? I have an issue trying to import the JDBC driver JAR in Eclipse Oxygen JRE8 for SQL Server 2017.
I have downloaded JDBC driver 6.4 and 4.2. Driver are added in library by build path, but I have error in my code which means this JAR could not import this:
Class.forName("com.sqlserver.jdbc.driver")

When replacing selenium jars with latest version under JMeter lib folder 'ConversionException' is thrown

I am working with JMeter and Selenium. Installed the plugins manager and via that, installed web-driver sampler. When I look into lib folder, I found the selenium jars version are 2.52.0 which is much older. I can able to work with that without any issues. But the real problem is:
Using Maven, I updated all the selenium jars to 3.9.1 version and its dependant jars like guava, gson, commons, etc.
Now, when I open the jmx files with WebDriver sampler and driver configs, I receive below error.
Using maven, I mean, I downloaded all the jars from maven repo manually and pasted into JMeter lib folder.
Please help me to work with latest Selenium drivers in JMeter.
You won't be able to use WebDriver Sampler plugin with Selenium 3.9.1 as it explicitly relies on SessionNotFoundException class which has been removed in the latest Selenium libraries.
So the options are in:
Use WebDriver Sampler with browser version(s) supported by Selenium 2.52.0
Reach out to WebDriver Sampler plugin developers and/or maintainers at jmeter-plugins forum to check whether it is planned to update Selenium libraries and if yes - when. You can also update WebDriver Sampler source code by yourself and send pull request to the plugin maintainer.
Switch to JSR223 Sampler and Groovy language instead. Apart from being able to use latest libraries you will have full control of the WebDriver instance using DesiredCapabilities at full instead of limited subset exposed via *Driver Config elements.

What is difference between selenium-server-standalone and selenium-server.

I can see two repository in Maven Central repo. Please clarify what is difference between both jars
This is explained in the Selenium documentation:
You may, or may not, need the Selenium Server, depending on how you
intend to use Selenium-WebDriver. If your browser and tests will all
run on the same machine, and your tests only use the WebDriver API,
then you do not need to run the Selenium-Server; WebDriver will run
the browser directly.
There are some reasons though to use the Selenium-Server with
Selenium-WebDriver.
You are using Selenium-Grid to distribute your tests over multiple
machines or virtual machines (VMs).
You want to connect to a remote
machine that has a particular browser version that is not on your
current machine.
You are not using the Java bindings (i.e. Python, C#,
or Ruby) and would like to use HtmlUnit Driver
The selenium-server-standalone.jar was used in older Selenium versions (with Selenium Server).
Newer versions of Selenium (WebDriver API) uses selenium-java.jar.
As per the Selenium Server jar releases, selenium-server-standalone jars are no more pushed to the Maven Artifact.
Till Selenium Release v2.53.0, selenium-server-standalone jars were pushed to the Maven Artifact separately as Jenkins Releases. But starting Selenium Release v3.x only the selenium-server jars and the selenium-java client jars are pushed to the Maven Artifact
Solution
If you running everything on the same machine, then using the selenium-java client maven dependency should be just fine.
If you running something on a machine that's not your desktop, then using the selenium-server maven dependency must be used. In this case you can also embed the Selenium server into your own project by adding the selenium-server dependency to your pom.xml.
If you intent to use the RemoteWebDriver implementation, then you need to download the selenium-server-standalone.jar from the Selenium Downloads page