Not able to click a div element

82 views
Skip to first unread message

Ashish Juyal

unread,
Aug 27, 2012, 2:39:32 AM8/27/12
to seleniu...@googlegroups.com
Hi 
    I am trying to click a div ,here's the code
<td class="ui-pg-button ui-corner-all" title="Delete Item"><div class="ui-pg-div"><span class="ui-icon ui-icon-trash"></span>Delete</div></td>
I failed to click the div.

Here my code

WebElement elements =driver.findElement(By.xpath("//*[@id='ItemMasterPager_left']/table/tbody/tr/td[1]/div[contains(text(),'Delete')]"));
       
        
       
        Actions moveTo = new Actions(driver);
        moveTo.moveToElement(elements).click().build().perform();


Any help will be appreciated


Thanks in advance 
Ashish Juyal


Reply all
Reply to author
Forward
0 new messages