Selenium With Java and Python For Mobile Apps & Web Apps......!

Tuesday, 21 April 2015

How to connect Excel Sheet Using Selenium Web driver.

To get data from excel sheet or write data in excel sheet we require some other  api which available  on below link:
Steps :
1. Download apache poi form https://poi.apache.org/download.html link.
2. Unzip and import jar your project.
3.Use given API to connect to excel sheet



package genricLib;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;



import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;


public class ExcelLib {
String path="C:\\Users\\ADMIN\\Desktop\\EmployeeDetails.xls";
/**
* Get Data From Excel File.....
* @param sheet
* @param rowno
* @param colno
* @return data
*/
public String getData(String sheet,int rowno,int colno) throws InvalidFormatException, IOException {

FileInputStream fis=new FileInputStream(path);
Workbook wb=WorkbookFactory.create(fis);
Sheet sh=wb.getSheet(sheet);
Row rw=sh.getRow(rowno);
String data=rw.getCell(colno).getStringCellValue();


return data;
}
/**
* Save data in Excel Sheet
* @param sheet Name
* @param rowno
* @param colno
* @param data
*/
public void setData(String sheet,int rowno,int colno,String data) throws InvalidFormatException, IOException {

FileInputStream fis=new FileInputStream(path);
Workbook wb=WorkbookFactory.create(fis);
Sheet sh=wb.getSheet(sheet);
Row rw=sh.getRow(rowno);
Cell cel=rw.getCell(colno);
cel.setCellType(cel.CELL_TYPE_STRING);
cel.setCellValue(data);
FileOutputStream fos=new FileOutputStream("C:\\Documents and Settings\\PavanD\\Desktop\\pardeep.xlsx");
wb.write(fos);




}
/**
* To get Total no row in Excel File
* @param sheet
* @return No of Row
*/

public int getRowCount(String sheet) throws InvalidFormatException, IOException
{

FileInputStream fis=new FileInputStream(path);
Workbook wb=WorkbookFactory.create(fis);
Sheet sh=wb.getSheet(sheet);
int data=sh.getLastRowNum();

return data;
}
/**
* To Get Total No Of Column in Row
* @param sheet
* @param rowNo
*/
public int getColomnCount(String sheet,int rowNo) throws InvalidFormatException, IOException
{

FileInputStream fis=new FileInputStream(path);
Workbook wb=WorkbookFactory.create(fis);
Sheet sh=wb.getSheet(sheet);
Row rw=sh.getRow(rowNo);
int data=rw.getLastCellNum();

return data;

}

}

Thursday, 16 April 2015

How to take ScreenShot using Selenium WebDriver.

import org.apache.commons.io.FileUtils;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.support.events.EventFiringWebDriver;

public class ReportLib {


/**
* To Get Screen Shot If Test case Fail and 
* @throws IOException
*/
public void getsnapShot(String name) throws IOException{
String path="E:\\abc\\xyz\\project1\\TestData\\"+name+".png";

EventFiringWebDriver edriver=new  EventFiringWebDriver(Driver.driver);
File srcimg=edriver.getScreenshotAs(OutputType.FILE);
File dstimg=new File(path);
FileUtils.copyFileToDirectory(srcimg, dstimg);

}

}
For Example:

Wednesday, 15 April 2015

How to Handle Proxy Setting using Selenium Webdriver .

Mozilla FireFox:
FirefoxProfile profile = new FirefoxProfile();

profile.setPreference("network.proxy.type", 1);

profile.setPreference("network.proxy.http", "localhost");

profile.setPreference("network.proxy.http_port", 3128);

WebDriver driver = new FirefoxDriver(profile);

or
String PROXY = "localhost:8080";

org.openqa.selenium.Proxy proxy = new org.openqa.selenium.Proxy();
proxy.setHttpProxy(PROXY)
     .setFtpProxy(PROXY)
     .setSslProxy(PROXY);
DesiredCapabilities cap = new DesiredCapabilities();
cap.setCapability(CapabilityType.PROXY, proxy);
WebDriver driver = new FirefoxDriver(cap);

 Internet Explorer:

String PROXY = "localhost:8080";

org.openqa.selenium.Proxy proxy = new org.openqa.selenium.Proxy();
proxy.setHttpProxy(PROXY)
     .setFtpProxy(PROXY)
     .setSslProxy(PROXY);
DesiredCapabilities cap = new DesiredCapabilities();
cap.setCapability(CapabilityType.PROXY, proxy);

WebDriver driver = new InternetExplorerDriver(cap);

Chrome:
String PROXY = "localhost:8080";

org.openqa.selenium.Proxy proxy = new org.openqa.selenium.Proxy();
proxy.setHttpProxy(PROXY)
     .setFtpProxy(PROXY)
     .setSslProxy(PROXY);
DesiredCapabilities cap = new DesiredCapabilities();
cap.setCapability(CapabilityType.PROXY, proxy);

WebDriver driver = new ChromeDriver(cap);

Thursday, 9 April 2015

How to Interact with hidden elements using Selenium Webdriver.

Since a user cannot read text in a hidden element, WebDriver will not allow access

to it as well.However, it is possible to use Javascript execution abilities to call getText directly

from the element:

WebElement element =((JavascriptExecutor) driver).executeScript("return arguments[0].getText();", element);

Wednesday, 8 April 2015

How to handle SSL certificate in Mozilla,Chrome and Internet Explorer or How to work with Https websites .

Mozilla:

FirefoxProfile profile = new FirefoxProfile();

profile.setAssumeUntrustedCertificateIssuer(false);

driver = new FirefoxDriver(profile);

driver.get("https://google.com/ <https://mailbox.com/> ");


Chrome:

DesiredCapabilities capabilities = new DesiredCapabilities();

    capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);

    System.setProperty("webdriver.chrome.driver", "D:\\Softwares\\Selenium 

softwares\\drivers\\chromedriver.exe");

    _driver = new ChromeDriver(capabilities);

    System.setProperty("webdriver.chrome.driver",

            "D:/Softwares/Selenium softwares/drivers/chromedriver.exe");

    //_driver.manage().timeouts().implicitlyWait(100, TimeUnit.SECONDS);

Internet Explorer :

System.setProperty("webdriver.ie.driver",

    "D:/Softwares/Selenium softwares/drivers/IEDriverServer.exe");

    DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();    

capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_B

Y_IGNORING_SECURITY_DOMAINS, true); 

    capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);

    capabilities.setJavascriptEnabled(true); 

    //capabilities.setCapability("chrome.switches", Arrays.asList("--ignore-

certificate-errors"));

    _driver = new InternetExplorerDriver(capabilities);

    _driver.manage().timeouts().implicitlyWait(100, TimeUnit.SECONDS);


    login();

    

Wait Statement in Selenium Webdriver.

Wait Statement during Navigation:



Thread.sleep(5000) Wait For 5 Seconds using Java API

Implicitly Wait Command:Implicit wait statement used wait till entire page get download
driver.manage().timeouts().implicitlyWait(3, TimeUnit.SECONDS);


Expected Conditions Commands:Explicit wait statement used to load web element not entire page used in dynamic app(ajax app)

WebDriverWait wait=new WebDriverWait(driver,30);
wait.until(ExpectedConditions.elementToBeClickable(By.linkText("add project")));

FluentWait Command:An implementation of the Wait interface that may have its timeout and polling interval configured on the fly. Each FluentWait instance defines the maximum amount of time to wait for a condition, as well as the frequency with which to check the condition. Furthermore, the user may configure the wait to ignore specific types of exceptions whilst waiting, such as NoSuchElementExceptions when searching for an element on the page

->:Waiting 30 seconds for an element to be present on the page, checking
->: for its presence once every 5 seconds.
  
  Wait<WebDriver> wait = new FluentWait<WebDriver>(driver)
       .withTimeout(30, SECONDS)
       .pollingEvery(5, SECONDS)
       .ignoring(NoSuchElementException.class);

   WebElement foo = wait.until(new Function<WebDriver, WebElement>() {
     public WebElement apply(WebDriver driver) {
       return driver.findElement(By.id("foo"));
     }

   });

Set ScriptTimeoutSet the amount of time to wait for an asynchronous script to finish execution before throwing an error. If the timeout is negative, then the script will be allowed to run indefinitely.

driver.manage().timeouts().setScriptTimeout(100,SECONDS);
PageLoadTimeout:Set the amount of time to wait for a page load to complete before throwing an error. If the timeout is negative, page loads can be indefinite.


driver.manage().timeouts().pageLoadTimeout(100, SECONDS);

Tuesday, 7 April 2015

How to connect Data Base Using Using Java or Selenium Webdriver

Data Base Code

import java.sql.*;

public class DatabaseConnectDemo{

public static void main(String[] args) throws Throwable {

//Resgister the driver through 

Class.forName("oracle.jdbc.driver.OracleDriver");

System.out.println("registered driver successfully");

//Create the connection and assign to connection reference

Connection 

con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE", 

"username", "password");

System.out.println("connection successsfully");

//create a statement through connection reference and assign to statement reference

Statement stmt=con.createStatement();

System.out.println("statement object created successfully");

//call the executequery method through statement reference and pass the query as 

argument.

ResultSet rs=stmt.executeQuery("select * from emp");

System.out.println("query is executed");

while(rs.next()){

int i=rs.getInt(1);

String str=rs.getString(2);

String str1=rs.getString(3);

int i1=rs.getInt(4);

System.out.println(i+"\t"+str+"\t"+str1+"\t"+i1);

}}}

Thursday, 5 March 2015

Different Types Of Pop Up in Selenium Web Driver.

How To Handle Multiple Windows Navigation Using Web Driver....


import java.util.Iterator;
import java.util.Set;
import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.Select;

public class WinowHandle {

public static void main(String[] args) throws InterruptedException {

// login to App
WebDriver driver=new FirefoxDriver();
driver.get("http://piyush-pc/login.do");
driver.findElement(By.name("username")).sendKeys("admin");
driver.findElement(By.name("pwd")).sendKeys("manager");
driver.findElement(By.xpath("//input[@type='submit']")).click();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

// navigate to "time track" page
driver.findElement(By.linkText("Time-Track")).click();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

// navigate to "Add task" page
Select sel = new Select(driver.findElement(By.name("selectedUser")));
sel.selectByIndex(1);
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

// when action causes on "Add tasks" link , which opens new window
driver.findElement(By.linkText("Add tasks to the list")).click();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

//get all windows id using getWindowHandles() mtds
Set<String> set = driver.getWindowHandles();

//capture window id from Collection "Set" using iterator
Iterator<String> it = set.iterator();
// get parent and child window Id , & store it in string variable
String parentWindowId = it.next();
String childWindowId = it.next();

//display all window id's
System.out.println(parentWindowId);
System.out.println(childWindowId);

//pass driver control to child window
driver.switchTo().window(childWindowId);

//perform  an operation on child window
driver.findElement(By.xpath("//input[@value='Show Tasks']")).click();

//close child window
driver.close();

// pass control back to parent window
driver.switchTo().window(parentWindowId);

//perform an operation on parent window
driver.findElement(By.linkText("Reports")).click();

}


}



How To Handle  Alert pop up Using Web Driver....


import java.util.Iterator;
import java.util.Set;
import java.util.concurrent.TimeUnit;

import org.openqa.selenium.Alert;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.Select;
import org.openqa.selenium.support.ui.WebDriverWait;

public class AlertHandling {
public static void main(String[] args) {

WebDriver driver=new FirefoxDriver();

driver.get("http://piyush-pc/login.do");
driver.findElement(By.name("username")).sendKeys("admin");
driver.findElement(By.name("pwd")).sendKeys("manager");
driver.findElement(By.xpath("//input[@type='submit']")).click();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);


//navigate add Projects & Customers page
driver.findElement(By.linkText("Projects & Customers")).click();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);


//navigate to customer details page
driver.findElement(By.linkText("sk11")).click();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

// click on delete customer , which alert popUP
driver.findElement(By.xpath("//input[@value='Delete This Customer']")).click();

//pass driver control to alert
Alert alt = driver.switchTo().alert();

// perform an operation on alert
System.out.println(alt.getText());

//click on "Cancel" button
//alt.dismiss();

//click on "OK" button
alt.accept();

}

How To Handle Invisible pop up Using Web Driver....


import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class InvisiblePopupExample {
public static void main(String[] args) throws InterruptedException {
WebDriver driver=new FirefoxDriver();//launch browser
driver.get("http://piyush-pc/login.do");//navigate to actiTime login page
driver.findElement(By.name("username")).sendKeys("admin");
driver.findElement(By.name("pwd")).sendKeys("manager");
driver.findElement(By.xpath("//input[@type='submit']")).click();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.findElement(By.linkText("Projects & Customers")).click();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.findElement(By.xpath("//input[@style='width: 108pt;']")).click();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.findElement(By.name("name")).sendKeys("xyz");
driver.findElement(By.linkText("Reports")).click();
boolean status=driver.findElement(By.xpath("//input[@id='RemainOnThePageButton']")).isEnabled();
if(status)
{
Thread.sleep(3000);
driver.findElement(By.xpath("//input[@id='RemainOnThePageButton']")).click();

}
else {
System.out.println("Invisible pop-up not displayed");
}
}


}


Tuesday, 17 February 2015

Drop Down or Select List in Selenium Web Driver.

Select Class Example....How to handle Select List or Drop Down

package basic;

import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.Select;

public class SelectClassExample {
public static void main(String[] args) throws InterruptedException {

WebDriver driver=new FirefoxDriver();//launch browser
driver.get("http://piyush-pc/login.do");//navigate to actiTime login page
driver.findElement(By.name("username")).sendKeys("admin");
driver.findElement(By.name("pwd")).sendKeys("manager");
driver.findElement(By.xpath("//input[@type='submit']")).click();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
 driver.findElement(By.linkText("Projects & Customers")).click();

 driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
 WebElement selectlst=driver.findElement(By.name("selectedCustomer"));
 Select sel=new Select(selectlst);
    sel.selectByIndex(1);
    driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
    driver.findElement(By.xpath("//input[contains(@value,'Show')]")).click();
    Thread.sleep(3000);
    System.out.println("done");
}
}

Or
package app1;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.Select;

public class MultiSelectList {
public static void main(String[] args) throws InterruptedException {

WebDriver driver=new FirefoxDriver();
System.out.println("done");
driver.get("http://piyush-pc/login.do");
driver.findElement(By.name("username")).sendKeys("admin");
driver.findElement(By.name("pwd")).sendKeys("manager");
driver.findElement(By.xpath("//input[@type='submit']")).click();
Thread.sleep(2000);
driver.findElement(By.linkText("Reports")).click();
Thread.sleep(2000);
WebElement wb=driver.findElement(By.name("users"));
Select sel=new Select(wb);
System.out.println(sel.isMultiple());
sel.selectByIndex(0);
//sel.selectByIndex(1);

}


}

Dynamic Web List:
package app1;

import java.util.List;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.Select;

public class DynamicWebList {
public static void main(String[] args) {

WebDriver driver=new FirefoxDriver();
System.out.println("done");
driver.get("http://piyush-pc/login.do");
driver.findElement(By.name("username")).sendKeys("admin");
driver.findElement(By.name("pwd")).sendKeys("manager");
driver.findElement(By.xpath("//input[@type='submit']")).click();
WebElement wb=driver.findElement(By.name("customerProject.shownCustomer"));
Select sel=new Select(wb);

List<WebElement> lst = sel.getOptions();

//display size of list
System.out.println(lst.size());
String expval="C";
boolean flag=false;
//display dynamic weblist item name
for (int i = 0; i < lst.size(); i++) {
System.out.println(lst.get(i).getText());
String val=lst.get(i).getText();
if(expval.equals(val))
{
sel.selectByVisibleText(expval);
flag=true;
break;
}
}
if(flag)
{
System.out.println("pass");
}
else {
System.out.println("fails");
}
}


}


Key Board Operation Example :
package basic;

import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.interactions.Actions;


public class KeyboardOperationExample {
public static void main(String[] args) throws InterruptedException {
WebDriver driver=new FirefoxDriver();//launch browser
driver.get("http://piyush-pc/login.do");//navigate to actiTime login page
driver.findElement(By.name("username")).sendKeys("admin");
driver.findElement(By.name("pwd")).sendKeys("manager");
String un= driver.findElement(By.name("username")).getAttribute("value");
   System.out.println(un);
//driver.findElement(By.name("pwd")).sendKeys("manager");
Thread.sleep(3000);
Actions act=new Actions(driver);
WebElement wb=driver.findElement(By.xpath("//input[@type='submit']"));
act.moveToElement(wb).perform();


act.sendKeys(Keys.SHIFT,Keys.DELETE).perform();
act.sendKeys(Keys.ENTER).perform();

}


}

Get All Web Elements Example...

package basic;

import java.util.List;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;

public class GetAllWebElementExamole {
public static void main(String[] args) {

WebDriver driver=new FirefoxDriver();//launch browser
driver.get("http://piyush-pc/login.do");//navigate to actiTime login page
driver.findElement(By.name("username")).sendKeys("admin");
String un= driver.findElement(By.name("username")).getAttribute("value");
   System.out.println(un);
driver.findElement(By.name("pwd")).sendKeys("manager");
driver.findElement(By.xpath("//input[@type='submit']")).submit() ;
//to get all link element present in ui
List<WebElement> lst =driver.findElements(By.xpath("//a"));
//to get all web elements
//List<WebElement> lst1 =driver.findElements(By.xpath("//*"));
// System.out.println(lst1.size());
System.out.println(lst.size());

//show all
for (int i = 0; i < lst.size(); i++) {
System.out.println(lst.get(i).getText());


}
for (int i = 0; i < lst1.size(); i++) {
System.out.println(lst1.get(i).getText());

}

}

}


Auto Suggestion.....
package pac1;

import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class AutoSugesstEditBox {

public static void main(String[] args) throws InterruptedException {
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.co.in/?gws_rd=cr");
driver.findElement(By.id("gbqfq")).sendKeys("cognizant wiki" ,Keys.ENTER);


}


}



Saturday, 31 January 2015

Basic Program for Webdriver Beginners-3

Basic Example...

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class BasicOpExam {
public static void main(String[] args) {
WebDriver driver=new FirefoxDriver();
driver.get("http://127.0.0.1/login.do");

System.out.println("current url"+driver.getCurrentUrl());

System.out.println("title of page"+driver.getTitle());

System.out.println("page source code"+driver.getPageSource());

System.out.println("class name"+driver.getClass());

System.out.println("window id"+driver.getWindowHandle());

driver.navigate().back();

driver.navigate().forward();

driver.navigate().refresh();

driver.manage().window().maximize();

System.out.println("done");

driver.quit();
}

}
WebDriver Wait Example:

package basic;

import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;

public class WaitStatementExample {
public static void main(String[] args) throws InterruptedException {
WebDriver driver=new FirefoxDriver();//launch browser
driver.get("http://piyush-pc/login.do");//navigate to actiTime login page
driver.findElement(By.name("username")).sendKeys("admin");
driver.findElement(By.name("pwd")).sendKeys("manager");

Thread.sleep(3000);//using java api wait statement
driver.findElement(By.xpath("//input[@type='submit']")).click();
System.out.println("login done");

driver.manage().timeouts().implicitlyWait(3, TimeUnit.SECONDS);  //implicit wait statement used wait till entire page get download 
driver.findElement(By.linkText("Projects & Customers")).click();

WebDriverWait wait=new WebDriverWait(driver,30);
wait.until(ExpectedConditions.elementToBeClickable(By.linkText("add project")));

//explicit wait statement used to load web element not entire page used in dynamic app(ajax app)
System.out.println("done");

}


}



Wednesday, 14 January 2015

How to Launch Multiple Browser in Webdriver

Launch Multiple Browser Example:

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.safari.SafariDriver;

public class MutlipleBrowserExample {
public static void main(String[] args) {


String browserType="FireFox";
WebDriver driver=null;
if(browserType.equals("FireFox"))

{

driver=new FirefoxDriver();

}
else if (browserType.equals("Chrome")) {
System.setProperty("webdriver.chrome.driver","E:\\SOFTWARES\\chromedriver.

exe");// path of chrome server for Webdriver
WebDriver d=new ChromeDriver();


}
else if (browserType.equals("IE")) {
System.setProperty("webdriver.ie.driver","C:\\Users\\IEDriverServer.exe");

WebDriver driver = new InternetExplorerDriver();
capabilities.setBrowserName("safari");
CommandExecutor executor = new SeleneseCommandExecutor(new 
URL("http://localhost:4444/"), new URL("http://www.google.com/"), capabilities);
WebDriver driver = new RemoteWebDriver(executor, capabilities);
}
DesiredCapabilities capabilities = new DesiredCapabilities();

}
}

}


Translate

Popular Posts

Total Pageviews