Automation in Google Chrome

For automation in Google Chrome you need to install the chrome driver.

The following screenshot displays the location of the download:

Here is the URL: http://chromedriver.storage.googleapis.com/index.html?path=2.21/

Automation in Google Chrome

Once downloaded you need to install the Chrome driver and set the path of the chrome driver in the path of the system.

Once the Chrome driver is up, the following screen will be displayed:

Automation in Google Chrome

Once the screen is displayed you can now start automating your test using the chrome browser.

Also, before working on the chrome browser make sure you have downloaded the chrome driver which is compatible with your Selenium version and your browser.

You can find compatibility details at the following website:

https://sites.google.com/a/chromium.org/chromedriver/

Just for reference, the following is a sample script for UI automation using the Chrome driver:

import org.openqa.selenium.*;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.ie.InternetExplorerDriver;
import com.eviware.soapui.model.*
import org.openqa.selenium.chrome.ChromeDriver;
import com.eviware.soapui.model.testsuite.Assertable
import com.eviware.soapui.support.XmlHolder
import java.io.File;
//import java.util.*;
//import jxl.write.*
//import jxl.*
def regLogger = org.apache.log4j.Logger.getLogger("RegressionTestLoger");
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def properties = new java.util.Properties();
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
import com.thoughtworks.selenium.Selenium;

//System.setProperty("webdriver.chrome.driver", "C:\Program Files\SmartBear\SoapUI-5.0.0\bin\ext\chromedriver.exe");
//WebDriver driver = new ChromeDriver();
                     driver.manage().deleteAllCookies();
 driver.get("http://www.google.com ");

In the preceding script we use the chrome driver to run the test on the chrome browser.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.37.196