Why not add a float version of WebElement.getSize() and WebElement.getLocation()?

23 views
Skip to first unread message

Gerald Song

unread,
May 26, 2016, 11:01:07 PM5/26/16
to Selenium Users
In Javascript, getSize and getLocation return a float type result, while in Selenium they return an int. It may cause some error when I try to calculate whether the elements have the same distance.

⇜Krishnan Mahadevan⇝

unread,
May 26, 2016, 11:10:49 PM5/26/16
to Selenium Users
Gerald,
May be you can do that even today by invoking driver.executeScript() and then casting the response to whatever data type you need no ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Fri, May 27, 2016 at 7:19 AM, Gerald Song <songbo...@gmail.com> wrote:
In Javascript, getSize and getLocation return a float type result, while in Selenium they return an int. It may cause some error when I try to calculate whether the elements have the same distance.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/77a40e4b-65de-4f2a-a336-9fd39d3e95aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages