欧美三区_成人在线免费观看视频_欧美极品少妇xxxxⅹ免费视频_a级毛片免费播放_鲁一鲁中文字幕久久_亚洲一级特黄

[Selenium]How to click on a hidden link ,mov

系統 1778 0
      <table id="_paid_19" class="GOMainTable" cellspacing="0" cellpadding="0">

<tbody>

<tr>

<tr>

<td style="
      
        overflow:hidden
      
      ;">

<div class="GOBodyMid" style="
      
        overflow: hidden
      
      ; width: 625px; height: 334px;">

<div class="GOPageOne">

<table class="GOSection" cellspacing="0" cellpadding="0">

<tbody>

<tr>

<tr class="GODataRow " style="height: 26px;" onmousemove="Grids[3].ARow=Grids[3].Rows["AR1"];Grids[3].ASec=0;">

<td style="width:0px;height:0px"></td>

<td class=" GOClassReadOnly highlight-tbl HoverClass GOText GOCell HideCol3displayName" colspan="2" style="">
      
        Automation Smoke test Template
      
      </td>

<td class=" GOClassReadOnly highlight-tb HoverClass GOHtml GOCell HideCol3editPencil" colspan="2" style="">


      
        <div class="edit-Pencil"></div>
      
      

</td>

<td class=" GOClassReadOnly highlight-tb b_r HoverClass GOHtml GOCell HideCol3deleteIcon" colspan="2" style="">

<td class=" GOClassReadOnly highlight-tb b_r HoverClass GODate GOCell HideCol3dateModified" colspan="2" style="">8/11/2014</td>

<td class=" GOClassReadOnly highlight-tb b_r HoverClass GOText GOCell HideCol3owner" colspan="2" style="">Rachel Lv</td>

<td class=" GOClassReadOnly highlight-tbr HoverClass GOText GOCell HideCol3permission" colspan="2" style="">Read Only</td>

<td class=" HoverClass GOHtml GOCellEmpty GOEmpty HideCol3_ConstWidth"> </td>

</tr>


    

?場景:需要找到Table中的某一行,然后找到這行的鉛筆圖標,點這個鉛筆圖標會出來下拉菜單,然后在下拉菜單中點擊Open

剛開始寫腳本的時候,按照以往的方式會報這樣的錯誤: "Element is not currently visible and so may not be interacted with"

這個元素在界面上是可見的,也通過正則表達式唯一匹配到了,可是在Click的時候就是不行。

后來查閱資料,發現這個元素的父元素是 hidden 的。

原文如下:

Selenium determines an element is visible or not by the following criteria (use a DOM inspector to determine what css applies to your element, make sure you look at computed style):

  • visibility != hidden
  • display != none (is also checked against every parent element)
  • opacity != 0 (this is not checked for clicking an element)
  • height and width are both > 0
  • for an input, the attribute type != hidden

Your element is matching one of those criteria. If you do not have the ability to change the styling of the element, here is how you can forcefully do it by using Actions in the code.

后來我是這樣解決的,可以成功運行了。

      Actions action =new Actions(driver);

WebElement pencilIcon = page.getPencilIcon(templateName);

action.moveToElement(pencilIcon).click();

		

WebElement menu = page.getMenu();

action.moveToElement(menu).build().perform();

Assert.assertTrue(menu.isDisplayed(),"Cannot find the menu");

		

WebElement open = page.getOpenMenu();

open.click();


    

?

[Selenium]How to click on a hidden link ,move to the drop down menu and click submenu


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 日韩精品亚洲一级在线观看 | 香蕉久久a毛片 | 亚洲成aⅴ人在线观看 | saoav| 黄色av网站在线免费观看 | 国产成人免费高清激情明星 | 日韩三| 免费无码毛片一区二区A片 成人18网站 | 夜夜爽网站| 亚洲精品国产成人 | a级黄色片视频 | 99色综合| 九九视屏| 久久久久久网站 | 国产91成人精品亚洲精品 | 在线观看免费视频日韩 | 青娱乐免费视频在线观看 | 久草免费在线 | 亚洲美女亚洲精品久久久久 | 奇米影视在线观看 | 中文字幕成人av | 欧美精品一区在线发布 | 一级毛片ab片高清毛片 | 欧美精品久久久 | 91精品久久久久久久久久 | 国产激情久久久久久熟女老人AV | 久久艹逼 | www.sewang | 免费国产黄频在线观看视频 | 久久精品欧美一区 | 久草草视频在线观看免费高清 | 青娱乐在线视频观看 | 深夜福利影院 | 免费精品美女久久久久久久久久 | 污片免费看 | 欧美日韩中文字幕在线 | 亚洲一区视频在线 | 成人免费毛片视频 | 国产精品久久久久久一级毛片 | 国产一级免费在线观看 | 婷婷国产成人精品视频 |