Selenium Web Driver (Java) . How to click waypoint inside the map which is canvas in html5 page -
selenium web driver (java). how click waypoint inside map canvas in html5 page
currently, facing challenging problem drag , drop on map canvas in html5 page.
the source code of waypoint on map below:
<div id-"tool-tip" class="tool-tip-target" sytle="left 25.2597px;top:-13.085.px">
how can locate web element on canvas map , click since later need drop destination on 1 of waypoint on map.
the selenium web driver using 2.48.2
, programming language java.
here solution try neither of them works.
driver.findelement(by.cssselector("div#tool-tip.tool-tip-target")).click(); webelement = driver.findelement(by.cssselector("div[id='tool-tip'][class='tool-tip-target'][style='left:292.769px; top: 72.815px;']"))
as of knowledge can't directly identify elements designed under canvas in dom. hence can't provide locator of element perform click action.
the 1 way of automating scenario using action class providing locator of canvas element , x, y coordinates of clickable element.
actions clickat = new actions(getdriver()); clickat.movetoelement(getdriver().findelement(by.id("$zobj_717")), 100, 400).click(); clickat.build().perform();
however can't guarantee works perfect in machines.
Comments
Post a Comment