how to click on the yahoo sign in link using selenium web driver?

倾然丶 夕夏残阳落幕 提交于 2021-02-08 12:00:22

问题


(Sign In) this is the html tag of yahoo sign in. I want to click on the sign in using selenium web driver, and also get the value which is in the title="sign in"? can anyone solve my problem please.


回答1:


 WebElement el = driver.findElement(By.cssSelector(".social-enabled-txt"));
    String elementValue =  el.getText(); //This one gets the value 
      el.click(); // This one clicks on the signin button on yahoo.com homepage. 


来源:https://stackoverflow.com/questions/30481762/how-to-click-on-the-yahoo-sign-in-link-using-selenium-web-driver

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!