html - Selenium Element Cannot Be Scrolled Into View: (34). Using NUnit, C# -
getting error title when attempting click on <a> tag in regression test script. i've researched issue here: selenium::webdriver::error::movetargetoutofboundserror: element cannot scrolled view:[object htmlspanelement] , here well: https://groups.google.com/forum/#!msg/webdriver/r2jwswrik44/raclrplkiwej don't understand root cause of issue.
i've tried using by.jquery, by.id, by.css, by.xpath, selecting index , same error. here's relevant code:
html:
<div id="divtabs"> <a id="tabecheck" target="#divecheck">echeck</a> <a id="tabacecomments" target="#divacecomments">ace comments</a> <a id="tabreviewcomments" target="#divreviewcomments">review comments</a> <a id="tabreviewhistory" target="#divreviewhistory">review history</a> </div> css:
#divtabs{ writing-mode: tb-rl; -webkit-transform: rotate(90deg); -moz-transform: rotate(90deg); -ms-transform: rotate(90deg); -o-transform: rotate(90deg); transform: rotate(90deg); position: absolute; width: 27px; padding: 0px; height: auto; display: table-row; margin-bottom: 10px; } #divtabs { border: 1px solid #ccc; padding: 3px; white-space: nowrap; cursor: pointer; color: #3966bf; display: table-cell; background-color: #fff; } c#:
element = driver.findelement(by.id("tabreviewcomments")); element.click(); as can see, i'm trying click on 3rd <a> tag id of "tabreviewcomments." however, if have script click on first <a> tag id of "tabecheck", works in sense don't "can't scroll element view" error, element clicked, , script moves on past line. sadly, need click on third <a> tag. ideas short of moving <a id="tabreviewcomments" target="#divreviewcomments">review comments</a> top?
thanks!
its element un-clickable far browser goes, may because
- its position off-screen (negative space)
- its behind element (like modal overlay or something)
- it has 0 size (sometimes css can funny, browser maybe calculating size differetnlty seeing)
- a ui bug in system whereby element isn't visible reason
Comments
Post a Comment