How to check selenium WebDriver version in Ubuntu?

How to import WebDriver in selenium?

Hi all, I am new to web scraping.

I have written some codes for different websites and it was all ok, but now I need to make my codes more generic, so it can use for all sites I would need it. ? All my codes uses the same "driver = webdriver" line.

The code you posted appears to be in Python 3.x, which means that you don't need the webdriver.Chrome class (from the selenium package) any more. The webdriver package contains all of the functionality that was previously in the selenium package.

In the future, you can try to keep your code as current as possible, but if you are developing something for multiple platforms, or you are developing for several languages, you may need to keep some older code for some functionality.

Where is the ChromeDriver path in Linux?

I want to install ChromeDriver so I can run some scripts.

From what I have seen, there is a separate jar that needs to be used for the script, and an entire set of instructions/tutorials.

If I use my Ubuntu terminal I download the jar and then it asks me to "import the JAR into your projects classpath". But how do I make this file accessible to the java script? Is this possible at all? My second question is regarding paths. It uses /usr/bin/java -jar . To start up the chromedriver. This folder doesn't seem to exist on a Linux build in my understanding. I found /usr/lib/jvm/java-6-sun-1.0.26/bin/chromedriver but it is empty when I try using it from the terminal. Where am I supposed to put the chromedriver if it's not on my build or even in any location?
You should be able to download the zip of the ChromeDriver from here, which contains the Chromedriver along with all the necessary files, and unzip them. Put them into a directory of your choice, in your example you would likely just use /path/to/chromeDriver.

The path for the jar file should already be specified. No need to do anything else.

Note about the default version. By default on Ubuntu (based off of Oracle JDK 6u45) the Chromedriver version will be shipped with version 2.3. This version is known to cause problems. You should find another download on their downloads page for Ubuntu 14.

Related Answers

How can we use the Selenium tool with HeadSpin?

Selenium is a tool that is used to automate functional testing. There are two types...

What are 5 Uses of Selenium?

Selenium is a web-automation tool that helps you to test web applications....

Whats the focus of this Selenium Certification Training?

You can learn it in a week. You just have to know the basics about what we...