欧美三区_成人在线免费观看视频_欧美极品少妇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條評論
主站蜘蛛池模板: 99thz桃花论坛 | 韩国一大片a毛片 | 亚洲欧美中文日韩二区一区 | 精品视频在线观看视频免费视频 | 亚洲精品久久一区二区三区四区 | 99成人| 激情福利视频 | 日韩精品一区二区三区在线观看 | 精品久久久久久亚洲 | 欧美三级中文字幕hd | 男人天堂网www | 精品久久久一二三区 | 中文字幕视频在线 | 久久伊人一区二区三区四区 | 欧美大片在线看免费观看 | 久草手机在线播放 | 青娱乐伊人 | 久草在线免费播放 | 亚洲午夜精品久久久久久成年 | 欧美在线一区二区三区欧美 | 天天拍拍夜夜出水 | 天天爽夜夜爽夜夜爽 | 婷婷色在线视频 | 日韩三极| 99精品视频免费在线观看 | 午夜电影免费看 | 午夜精品毛片 | 青青草原伊人 | jizjizjiz中国护士18 | 古装三级在线观看 | 国产超级乱淫视频播放 | 欧美乱操 | 91久久精品国产91久久 | 欧美一级一毛片 | 一区二区三区在线观看免费 | 狠狠狠狠狠狠 | 久久男人视频 | 蜜桃av一区二区三区 | 大香久久 | 亚洲第一页在线视频 | 99久久婷婷|