TA的每日心情 | 衰 2016-3-4 11:17 |
---|
签到天数: 1 天 连续签到: 1 天 [LV.1]测试小兵
|
html:
<fieldset>
<input type="password" tabindex="3" placeholder="请输入二级密码" maxlength="20"><a style="display: inline; width: 12px; height: 12px; border-radius: 12px; border: 2px solid rgb(80, 78, 78); background-color: rgb(80, 78, 78);" class="sa-input-error" href="javascript:;"></a>
</fieldset>
<div class="sa-error-container"><div class="icon">!</div>
<p>Not valid!</p>
</div>
<div class="sa-button-container">
<button class="cancel" tabindex="2" style="display: inline-block; color: rgb(0, 0, 0); font-size: 12px; border-radius: 18.5px; margin-left: 37.4px; margin-right: 37.4px;">取消</button>
<button class="confirm" tabindex="1" style="display: inline-block; background-color: rgb(174, 222, 244); box-shadow: none; color: rgb(255, 255, 255); font-size: 12px; border-radius: 18.5px; margin-left: 37.4px; margin-right: 37.4px;">确定</button>
</div>
selenium java
WebElement fybanksRecharge2 = driver.findElement(By.xpath("(//input[@type='password'])[2]"));
fybanksRecharge2.click();
fybanksRecharge2.sendKeys("111111");
WebElement fybanksRecharge3 = driver.findElement(By.cssSelector("button.confirm"));
fybanksRecharge3.click();
或者用xpath各种查寻都无法定位到按钮,IDE直接报了定位不到或者Timeout帮我看看吧
|
|