added whitelist#49
added whitelist#49andreabisello wants to merge 4 commits intopython-needle:masterfrom andreabisello:master
Conversation
|
Nice, I really like this feature. Thanks for the suggestion. Here are a few comments:
Thanks! |
|
How i can set css properties or alter visibility of WebElement using WebElement api? in documentation http://selenium-python.readthedocs.io/api.html?highlight=javascript#module-selenium.webdriver.remote.webelement i find only getter method and in stack overflow everyone use execute_script api, so i used execute_script api to make element hidden using javascript. any suggestion? thanks. |
|
My recommendation is specifically to use Then to set a CSS property on a |
2)element to be ignored now can be css selector or needle web element 3)querySelector is not used anymore in order to find the element
|
Thanks for the updates. First, one small comment: I think we should assume that the provided CSS selectors might potentially return multiple elements. So, could you use Also, a note about the Regarding the tests. You could have the tests create a page with two elements in it, then take a screenshot while ignoring one of them, and then compare the resulting screenshot with a pre-generated control image. You should take a look at the existing tests for some inspiration. |
|
@jphalip thanks for the suggestions :-) 👍 |
Now you can pass a whitelist of css selector.
If css selectors matches somethings, those elements visibility will be set to "hidden" in order to avoid screenshot comparison failures on elements that can, by nature, change.