亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Java selenium 無法發送鍵和單擊元素

Java selenium 無法發送鍵和單擊元素

大話西游666 2021-09-15 15:15:26
我想嘗試登錄這個網站這是我的代碼:driver.findElement(By.id("userid_sebenarnya")).sendKeys("myUserName");這是輸入文本的屬性 id='userid_sebenarnya'<div class="form-group" id="form-group-height">    <label for="userid" class="text-field-label-horizontal-empty">User ID</label>    <input id="userid" class="fake_field_userid" style="-webkit-box-shadow: inset 0 0 0 2em transparent !important" value="autofill field" type="text">    <div class="outer-border-login">        <input class="form-control-login-transparent" id="userid_sebenarnya" placeholder="Masukkan user ID" onblur="removeErrMsg('#userid');" data-rule-required="true" data-msg-required="Field ini dibutuhkan" autocomplete="off" readonly="" onfocus="this.removeAttribute('readonly'); this.focus();" value="" autocorrect="off" autocapitalize="off" spellcheck="false" maxlength="2147483647" style="-webkit-box-shadow: inset 0 0 0 2em transparent !important" type="text">    </div></div>但是我收到了如下所示的錯誤消息,而如果我從視覺上看應該可以找到它。線程“main” org.openqa.selenium.NoSuchElementException 中的異常:沒有這樣的元素:無法定位元素:{“method”:“id”,“selector”:“userid_sebenarnya”}這與隱藏文本輸入有關,我該怎么辦?
查看完整描述

2 回答

  • 2 回答
  • 0 關注
  • 136 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號