1

I am getting the following error in a peculiar fashion.

The point at which the driver is attempting to click on the element was not scrolled into the viewport. 

The user story goes like this, if a selection is made in a check group, corresponding div with few fields will be enabled. Similarly for n-number of selection there will be n-number of DIVs. When i select only one option in the div, it works as expected but not for the multiple options.

i have read some stuffs and tried all the possible combination about the above said view port issue. My work around attempts and the outcomes are given below.

1) Tried with the Advanced interaction method. (Action class) - The same exception

2) Accessed with java-script executor- same exception

few more will be updated soon. I have tried all the combination of locating mechanism. Everything works perfect and the element is in visible mode. But when i perform any operation on the second DIV values i am getting the above said exception.

what can be possibly done to get the element in working mode?

EDIT :

1.The DIV elements all are in view port and they all are accessible individually.
2. Div are enabled as per the check box selected
3.In a scenario, if we choose two check box, after a first selection you can edit the DIV and for the second selection the DIV will not be accessible. 
4. both DIVs are identical with respect to the elements/attributes/properties of the elements.
5. When a Active div is edited no other div will be available in the UI.

For some reasons i was not able to produce the Reproducible code here.

Karthikeyan
  • 2,634
  • 5
  • 30
  • 51
  • Try this solution: http://stackoverflow.com/questions/12035023/selenium-webdriver-cant-click-on-a-link-outside-the-page – JacekM Oct 15 '13 at 13:48
  • Is there any chance that the parent `
    ` of the selections has an overflow attribute set to `hidden` or `none`? In other words, can you manually scroll around to all of the elements in question using the browser's scroll bars?
    – JimEvans Oct 15 '13 at 14:22
  • @JacekM, Tried too..! Actually they are in view port of the screen. If you select any one div in any order the first one will work, for rest they won't work. – Karthikeyan Oct 15 '13 at 15:31
  • @JimEvans, I don't think they need to scroll down, as they are in view port actually. Please see my above comment. – Karthikeyan Oct 15 '13 at 15:31
  • I didn't ask the question without a reason. The problem I mentioned can even occur when the element is completely visible within the viewport, if it meets certain conditions, including the one I mentioned in my comment. Can you answer that question please? Additionally, it will be next to impossible to give you a comprehensive answer without a reproducible case, including the HTML (and CSS and JS files for the page) that demonstrates the issue. – JimEvans Oct 15 '13 at 20:49
  • @JimEvans, I understand the value of your question.No such attribute for the DIV. Also, all the DIV are in view port if they enabled. Please refer my EDIT. – Karthikeyan Oct 16 '13 at 10:26
  • @JimEvans- The overflow value is auto. – Karthikeyan Oct 18 '13 at 12:04

1 Answers1

0

i sorted out the problem. There was actually a frame for every DIV. these frames are just hidden after the edit and a fresh frame is opened every time, so when i access the second div i had to choose the latest frame. i just polled for the number of frame and proceed with the latest one.

Karthikeyan
  • 2,634
  • 5
  • 30
  • 51