c# - Selenium click on coordinates not clicking where expected -


i need screen scrape webpage using activex controls navigation. not ui testing purposes, data downloads legacy application.

the issue have top navigation complete activex javascript , impossible elements anything. trying mouse clicks @ coordinates.

i using following method answer bergstrom

basically doing

var action = new actions(iedriver).movetoelement(iedriver.findelement(by.tag("html"))).movebyoffset(200,100).click().perform(); 

i confirmed while debugging iedriver.findelement returns -1,-1 location of html tag, offset coordinates should correct.

i measured coordinates using ie toolbar. when run code nothing happens, assume click in blank space.

is there way ping browser know coordinates or there better way of achieving this?

i able using vs coded unit test since moves cursor, don't think licensing allow me use option annoyance of getting run outside of visual studio.

rather trying element move offset. make sure know prior focus is... if none should top left corner of page. put sleep in middle , should able see mouse move, wait, , click.

actions action = new actions(driver); action.movebyoffset(200,100).perform(); thread.sleep(10000); action.click(); 

Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -