java - How to logout gmail using selenium script? -
java - How to logout gmail using selenium script? -
i writing selenium script gmail login , logout functionality. able login using below code.
//open gmail driver.get("http://www.gmail.com"); // come in userd id webelement element = driver.findelement(by.id("email")); element.sendkeys("xyz@gmail.com"); //wait 5 secs userid entered driver.manage().timeouts().implicitlywait(5, timeunit.seconds); //enter password webelement element1 = driver.findelement(by.id("passwd")); element1.sendkeys("password"); //submit button element.submit();
but not write script logout. yu please provide me script logout?
thanks!
try below code.
driver.findelement(by.classname("gb_ta")).click(); // click flyout menu driver.findelement(by.classname("gb_71")).click(); // click sign out button
java selenium automation
Comments
Post a Comment