This blog is for Automation Test Engineers

Saturday, 2 September 2017

How to print title of browser title

WebDriver driver=new FirefoxDriver();
JavascriptExecutor js=(JavascriptExecutor )driver;
String browsertitle=(String)js.executeScript("return navigator.userAgent");
System.out.println(browsertitle);


0

0 comments:

Post a Comment