popup - Touch elements at bottom of page got error: Element is not currently visible and so may not be interacted with -


i have long html page lots of editable elements. when click on element, edit dialog pop up. strange thing if element @ top of page, edit dialog can accessed while bottom , middle positon elements' edit dialog cann't accessed. error prints out is: "element not visible , may not interacted with". checks on failed edit dialog is:

p dialog.exist? ==>got true

p dialog.visible? ==>got false

puts dialog.attribute_value('style') ==>got ""

(firebug shows style attribute value 'display: block;' , checks on success dialog of top element has same value, visible 'false' !!! weired!! why can accessed?)

then tried:

browser.execute_script("document.getelementbyid('dialogdiv').style.display='block'; ")

to set dialog style attribute value 'display: block;' wish become visiable, failed.

on long page, when edit dialog of element pops up, there isn't scroll bar. there chance part of dialog of bottom element covered up. reason? tried:

bottom_element.wd.location_once_scrolled_into_view

to scroll bottom element before click it, when dialog pops up, part of dialog showed still fail access.

last trying:

after edit dialog opend, use javacript scroll

browser.execute_script("window.scrollby(0,-100)")

the dialog in middle of browser window , isn't coverd anything, still got

element not visible , may not interacted with

when moved similar long page has scroll bar after dialog poped up, dialog of bottom element can accessed successfully. dose has idea this? please share me, thank advance.

the html is:

<div id="dialogdiv" style="display: block;">     <div class="sage_dialog ui-draggable" style="top: 322px; display: block; margin-bottom: 1000px; left: 542px;"> 

the location , size of dialog are:

 <struct selenium::webdriver::point x=0, y=1576>   <struct selenium::webdriver::dimension width=800, height=0> 

i got clue how force selenium webdriver click on element not visible?

height=0 problem, how can change it?

after consulting html designer, got key of probelm, body html is:

<body class="float_guide_parent" style="width: 800px; overflow: hidden; cursor: auto;"> 

the value of overflow 'hidden', blocks showing of scroll bar, modified by:

browser.execute_script("$('.float_guide_parent').css('overflow',''); ")  

problem soveled.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -