myseleniumtraining
This blog is for Automation Test Engineers
Home
Friday, 16 March 2018
How to get size of object
WebDriver driver= new FirefoxDriver();
driver.get("https://www.google.com"):
WebElement button=driver.findElement(By.name("btnK"));
System.out.print(button.getSize());
Read More
By Chai on March 16, 2018
0
How to get tag name
WebDriver driver= new FirefoxDriver();
driver.get("https://www.google.com"):
WebElement button=driver.findElement(By.name("btnK"));
System.out.print(button.getTagName());
Read More
By Chai on March 16, 2018
0
How to get text of object
WebDriver driver= new FirefoxDriver();
driver.get("https://www.google.com"):
WebElement button=driver.findElement(By.name("btnK"));
System.out.print(button.getText());
Read More
By Chai on March 16, 2018
0
How to get location of object
WebDriver driver= new FirefoxDriver();
driver.get("https://www.google.com"):
WebElement button=driver.findElement(By.name("btnK"));
System.out.print(button.getLocation());
Read More
By Chai on March 16, 2018
0
How to get hashcode of object
WebDriver driver= new FirefoxDriver();
driver.get("https://www.google.com"):
WebElement button=driver.findElement(By.name("btnK"));
System.out.print(button.hashcode());
Read More
By Chai on March 16, 2018
0
How to handle popup in selenium
WebDriver driver =new FirefoxDriver();
driver.manage().window().maximize();
driver.get("https://www.vrlbus.in/vrl2013/register_customer.aspx");
WebElement firstbox=driver.findElement(By.name("FIRSTNAME"));
firstbox.sendKeys("chaitra");
driver.findElement(By.xpath("//input[@type='submit']")).click();
String alertmessage=driver.switchTo().alert().getText();
System.out.print(alertmessage);
Read More
By Chai on March 16, 2018
0
How to get title of page
System.setProperty("webdriver.ie.driver","E:\\IEDriverServer.exe";
Webdriver driver=new InternetExplorerDriver();
driver.get("https://www.flipkart.com/");
String title=driver.getTitle();
System.out.println(title);
Read More
By Chai on March 16, 2018
0
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)