Java – how do I wait for CSS properties to change?
•
Java
How do I tell selenium webdriver to wait on a specific element and set a specific attribute in CSS?
I want to wait: element Getcssvalue ("display") Equalsignorecase ("block")
Usually wait for the element to appear, as follows: webdriver. Wait() until (expectedconditions. Presenceofelementlocated (by. ID ("some_input"));
How do I wait for the specific CSS value of the display attribute?
Solution
I think it works for you
webdriver.wait().until(ExpectedConditions.presenceOfElementLocated(By.xpath("//*[@id='some_input'][contains(@style,'display: block')]")));
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码