如何使用selenium web驱动程序点击雅虎登录链接?

时间:2015-05-27 11:58:13

标签: selenium-webdriver

(登录)这是yahoo登录的html标签。我想点击使用selenium网络驱动程序登录,并获取标题中的值="登录" ?任何人都可以解决我的问题。

1 个答案:

答案 0 :(得分:0)

 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.