0
下面是movehover上下拉
<div id="pMenu_root_10" class="itemBorder" style="position: absolute; left: 809px; top: 0px; width: 58px; height: 98px; z-index: 1000; background: rgb(190, 213, 231) none repeat scroll 0% 0%; cursor: default;" onmouseover="pMenu.over('root',10)" onmouseout="pMenu.out('root',10)" onclick="pMenu.click('root',10)">
<div class="lowText" style="font-size: 11px; FONT-FAMILY: Arial; color: #0066CC; position: absolute; left: 1px; top: 1px; width: 56px; height: 96px">Reports</div>
</div>
我試圖鼠標硒懸停,這樣我可以選擇當前的子菜單中的某個HTML代碼。但我的硒不能獲得元素
WebElement ele = driver.findElement(By.xpath(".//div[@id='pMenu_root_10']/div[text()='Reports']"));
Actions act = new Actions(driver);
act.moveToElement(ele).perform();
我嘗試使用abosulte的Xpath以及由Firepath給出
.//*@id='loginFormName']/table[2]/tbody/tr/td[2]/table[1]/tbody/tr[5]/td/div/table/tbody/tr/td[3]/img
請幫我找到這個問題
下面是錯誤返回
Exception in thread "main" org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":".//div[@id='pMenu_root_10']/div[text()='Reports']"}
嘗試這樣的回答:http://stackoverflow.com/questions/43242950/how-to-open-a-webelement-from-a-hoover-menu-selenium-java/43247339#43247339 –
仍然給同樣的錯誤。它仍然沒有得到pMenu_root_10 –
請通過錯誤,你可以請分享您的網站網址? –