History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: SEL-426
Type: Bug Bug
Status: Open Open
Priority: Critical Critical
Assignee: Unassigned
Reporter: Derek L.
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Selenium

getElementPositionTop does not calculate the Top correctly on DIVs with overflow: auto/scroll in IE

Created: 07/Feb/07 04:09 PM   Updated: 16/Nov/07 02:40 PM
Component/s: None
Affects Version/s: 0.8.0
Fix Version/s: 1.0.1

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: 1. HTML File sel-426.html (3 kb)
2. File sel-426.rsel (0.4 kb)

Environment: IE6 on WinXP


 Description  « Hide
In selenium-api.js on line 1663, the comments state:

// Netscape can get confused in some cases, such that the height of the parent is smaller
// than that of the element (which it shouldn't really be). If this is the case, we need to
// exclude this element, since it will result in too large a 'top' return value.

This is obviously not true since a DIV of height 200px with overflow:scroll or auto can contain a child element with a height of 300px. On top of that, if this is a Netscape bug, then IE shouldn't even see this section of code.

Commenting out the entire if/else logic and keeping line 1674 ( // Next up... \n element = element.offsetParent) seemed to fix the issue in IE.

Please see the attached files for a test case. Keep in mind that this uses Y!UI for Drag and Drop capability to illustrate the issue. The Y!UI library has been linked w/in the HTML to the yahoo.com so you will not setup Y!UI locally.

 All   Comments   Work Log   Change History      Sort Order:
Derek L. - 07/Feb/07 04:13 PM
Selenium on Rails test

Derek L. - 07/Feb/07 04:14 PM
Sample HTML to run against the attached test

Dan Fabulich - 03/Jul/07 01:00 AM
I've only got IE7 on my machine here, so I can't reproduce this right now. Looks like it shouldn't be tough once I've got a proper repro environment.