java - How to make highlighted text remain highlighted when selecting another button? -
my application's mechanic highlight piece of text , press button make highlighted text answer. issue when select button, highlighted text disappears.
the text want highlight within html format:
<div id="passage_432" class="passage ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active" style="display: block;" aria-labelledby="passage_432_header" role="tabpanel" aria-expanded="true" aria-hidden="false"> <p>this test passage test 323</p> </div>
the code using select text follows:
webelement makeselection = driver.findelement(by.xpath(array3[9])); actions action = new actions (driver); action.movetoelement(startlocation, 0, 0); action.clickandhold(startlocation); action.movetoelement(startlocation, 3, 0); action.release(); action.perform(); makeselection.click();
edit(3/3/2016)
i found weird solution. code works when mouse-click out of browser window running automated test in. think happens when clicking within browser, system thinks highlighting else , disappears. issue need find way deselect browser , still have test run. suggestions?
Comments
Post a Comment