python-needle / needle

Automated tests for your CSS.
https://needle.readthedocs.io/
Other
590 stars 50 forks source link

Feature/nativedimensions #29

Closed khusseini closed 9 years ago

khusseini commented 10 years ago

This fixes errors on devices that do not support javascript returns

jphalip commented 10 years ago

Thanks a lot, that looks pretty good. Would you be able to add some tests for this? I just want to make sure this method is well tested. Also, could you remove the gitignore addition as I suppose this is mainly related to your personal working environment. Cheers!

khusseini commented 10 years ago

Hi jphalip, I have looked into the current written tests and found that TestWebElement has already a test defiend for get dimensions https://github.com/bfirsh/needle/blob/master/tests/test_driver.py#L31 Shouldn't this already cover it?

jphalip commented 10 years ago

Yes you're right, that test is fine.

My only concern is browser compatibility. I would trust jQuery to work in a large number of browsers, including old ones like IE6. I don't know if Selenium would work as well by itself.

Have you tested your patch in multiple browsers (if so, which ones)?

khusseini commented 10 years ago

I am no Selenium expert, however using the native properties of the WebElement would use the respective Browsers native way of getting an element's position. This should be a) faster, b) more reliable than using JavaScript. Crossbrowser compatability is therefore guaranteed.

jphalip commented 9 years ago

Thank you for this. That was fixed in ecb498fd71e4e9f87c3b09ca866f3977a7e41eb0 and v0.2.4!