RSS

Monthly Archives: January 2017

Selenium: Create New frame work First Phase


In Selenium we have to first assign keyword for that scripts(create common functions which we can use in any classes).

package Test;

import org.openqa.selenium.Alert;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.Select;
import org.openqa.selenium.support.ui.WebDriverWait;

public class keyword

{

private static final String String = null;

public static WebDriver driver;

public static By Byelement (String Type, String Path)

{

if (Type.equals(“id”))
{
return By.id(Path);
}

else if (Type.equals(“className”))
{
return By.className(Path);
}

else if (Type.equals(“name”))
{
return By.name(Path);
}

kevalshah.in

Read the rest of this entry »

Advertisements
 

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

 
%d bloggers like this: