Answer the question
In order to leave comments, you need to log in
How to select an element that appears after loading?
When the page is loaded in the preloader, there is no style="display: none. When everything is loaded, this parameter appears.
How to compose an xpath to catch this element?
<body>
<div id="preloader" class="default-preloader app" style="display: none;"> </div>
</body>
Answer the question
In order to leave comments, you need to log in
//div[@id = 'preloader' and not(@style)]
//div[@id = 'preloader' and @style = 'display: none;']
If you look strictly at the xpath regardless of the rest of the context, then you can use several conditions in the selector:
In addition, you can check for the presence or absence of the parent element, the adjacent element, and anything else to uniquely identify the DOM object you need.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question