image - xpath and css not recogonised selenium webdriver(java)

73 views
Skip to first unread message

Pavitra Hebbar

unread,
Jun 27, 2014, 8:06:12 AM6/27/14
to seleniu...@googlegroups.com
Hello all,
  In my web application there is a plus icon(pls refer the screenshot),which is basically a click event,on click of it a pop up should be displayed.I provided xpath/css selector,still my script is not running.Please let know how fix this issue.
Please find the html file of the same.

Thanks,
Pavitra
plus icon.png
HTML file.docx

James Anton

unread,
Jun 30, 2014, 11:15:08 PM6/30/14
to seleniu...@googlegroups.com
driver.findElement(By.xpath("//img[@title='Create Course']")).click();

anjaneyulu v

unread,
Jul 2, 2014, 12:15:54 AM7/2/14
to seleniu...@googlegroups.com
Hi,
We can use Actions class to mousehover and click.
Actions actn=new Actions(driver);
//store your target element in WebElement
 
WebElement ele=driver.findElement(By.xpath("+imgxpath"))
//use ele in actn

actn.moveToElement(ele).click().build().perform();

I hope the above code should work, if not give your url then i can fix the issue.

 

Thanks,

Anjaneyulu Vujani

Ripon Al Wasim

unread,
Jul 2, 2014, 4:23:42 AM7/2/14
to seleniu...@googlegroups.com
hi,
Please send HTML code only specific for Plus Icon (+). You have sent full HTML in which it is really difficult to find out the specific code for Plus sign.

Ripon


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/2e64683f-b0c4-4331-8041-93bffc8ba947%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages