import java.util.ArrayList;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class TableCheckbox
{
public static void main(String a[])
{
WebDriver driver=new FirefoxDriver();
driver.get("http://www.google.com");
driver.findElement(By.cssSelector("body")).sendKeys(Keys.CONTROL +"t");
ArrayList<String> tabs = new ArrayList<String> (driver.getWindowHandles());
driver.switchTo().window(tabs.get(0));
driver.get("http://www.gmail.com");
}
}
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class TableCheckbox
{
public static void main(String a[])
{
WebDriver driver=new FirefoxDriver();
driver.get("http://www.google.com");
driver.findElement(By.cssSelector("body")).sendKeys(Keys.CONTROL +"t");
ArrayList<String> tabs = new ArrayList<String> (driver.getWindowHandles());
driver.switchTo().window(tabs.get(0));
driver.get("http://www.gmail.com");
}
}
3 Comments
nice example.. Thanks Ankit
ReplyDeleteGood Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
ReplyDeletePython Training in electronic city
DataScience with Python Training in electronic city
AWS Training in electronic city
Big Data Hadoop Training in electronic city
Devops Training in electronic city
replica omega watches
ReplyDeletereplica hublot watches
replica rolex watches
replica breitling watches
replica longines watches