0

我有以下 HTML 片段:

<label for="widget_118_login_username">Username</label>

在 Selenium 2 (WebDriver) 中使用的 xpath 和 csspath (cssSelector) 是什么?

4

1 回答 1

0

以下对我来说很好:

Xpath: //标签[@for='widget_118_login_username']

cssSelector: 标签[for=widget_118_login_username]

于 2012-09-21T10:12:53.547 回答