Skip to content

Fix Element::IsAttachedToDom() when used with SVG for IEDriver#28

Closed
paroga wants to merge 7 commits intoSeleniumHQ:masterfrom
paroga:ie_svg
Closed

Fix Element::IsAttachedToDom() when used with SVG for IEDriver#28
paroga wants to merge 7 commits intoSeleniumHQ:masterfrom
paroga:ie_svg

Conversation

@paroga
Copy link
Copy Markdown
Contributor

@paroga paroga commented Mar 12, 2013

The first commits are already in #27.
CLA signed

paroga added 7 commits March 11, 2013 14:57
When the document is SVG instead of HTML the eventlistener for the
unload event needs to be added to documentElement instead of body.
This new function returns the corresponding element.
Some elements may not have a scrollIntoView function - for example,
elements under an SVG element. Call those only if they exist.
If the document in the view is a SVG scrolling does not make much
sense and resulting errors can be safely ignored.
SVG documents do not have a body attribute.
Check for its existence before accessing it.
When used with an SVG document the script element must be created
slightly different to work correctly.

Fixes issue SeleniumHQ#1276.
@paroga
Copy link
Copy Markdown
Contributor Author

paroga commented Apr 6, 2013

@jimevans can you commit this pull request?

@jimevans
Copy link
Copy Markdown
Member

jimevans commented Apr 6, 2013

I could, if I agreed with how it was coded. I've had incredibly bad luck with IHTMLElement::contains, as I've seen cases where it does not return the proper value based on the specifics of the DOM in question.

@paroga
Copy link
Copy Markdown
Contributor Author

paroga commented Apr 6, 2013

Do you have an better solution for supporting SVG documents in IE?
Are there tests for the cases which do not work?

@jimevans
Copy link
Copy Markdown
Member

jimevans commented Apr 7, 2013

No, there are no specific test cases. I ran into my issues when experimenting with removing the JavaScript automation atoms to attempt improving performance. So in a sense, the tests in ChildrenFindingTest.java exhibited problem when using contains().

@jimevans
Copy link
Copy Markdown
Member

Merged in 6392601

@jimevans jimevans closed this Apr 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants