Agreed. Plus, according to the CSS box model elements that are simply
transparent or have "visibility: hidden" still affect layout, so their
size and location is both important and well-defined.

--
Kevin
Simon Stewart Sunday, December 23, 2012 6:02 AM
+1 for Jason's getLocation()

The test that Alexei added to the tree demonstrates that block-level
elements that are hidden can still sometimes be "seen" on the page, so
+1 for the getSize() interpretation too.

Simon


--


Jason Leyba Friday, December 21, 2012 4:19 PM
getLocation()
- Should return the location if it can be computed. In the case of
display:none, it might make sense to just throw an error.

getSize()
- For display:none, we can compute what the size /would be/ if the
element were shown. Otherwise, thrown an error.

Guess that's not very helpful :)

On Fri, Dec 21, 2012 at 1:07 PM, Alexei Barantsev wrote:

Hi, devs,

What should return methods getLocation() and getSize() for
elements that are hidden or invisible?

I've added a new test class CoordinatesTest that fixes behaviour
currently implemented in drivers for Firefox and Chrome.

They return:

1) correct location for "hidden" elements (visibility:hidden or
opacity:1), that are not visible, but take place

2) (0,0) for "true invisible" elements (display:none)


Is this right or should we redefine semantics of getLocation() and
getSize() for invisible elements (invisible in all senses)?

Regards,
--
Alexei Barantsev
Software-Testing.Ru
Selenium2.Ru
--



--


Alexei Barantsev Friday, December 21, 2012 4:07 PM
Hi, devs,

What should return methods getLocation() and getSize() for elements
that are hidden or invisible?

I've added a new test class CoordinatesTest that fixes behaviour
currently implemented in drivers for Firefox and Chrome.

They return:

1) correct location for "hidden" elements (visibility:hidden or
opacity:1), that are not visible, but take place

2) (0,0) for "true invisible" elements (display:none)

Is this right or should we redefine semantics of getLocation() and
getSize() for invisible elements (invisible in all senses)?

Regards,
--
Alexei Barantsev
Software-Testing.Ru
Selenium2.Ru
--
--

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 4 | next ›
Discussion Overview
groupselenium-developers @
categoriesselenium
postedDec 21, '12 at 9:07p
activeDec 28, '12 at 12:08p
posts4
users4
websiteseleniumhq.org

People

Translate

site design / logo © 2021 Grokbase