How to choose element that appears after the download?

When page load in the preloader is missing style="display: none. When all was prigrezilos this parameter appears.
How to write xpath to get the element?

the <body>
 <div id="preloader" class="default-app preloader" style="display: none;"> </div>

Just //div[@style] do not work, because on the page a lot more similar items.
March 19th 20 at 09:12
2 answers
March 19th 20 at 09:14
//div[@id = 'preloader' and not(@style)]
//div[@id = 'preloader' and @style = 'display: none;']
Oh, and!
Thank you very much! - grady.Heathcote commented on March 19th 20 at 09:17
March 19th 20 at 09:16
If you look strictly at xpath independently from the rest of the context, you can use multiple conditions in the selector:
//div[@id="preloader"][contains(@style, "none")]
In addition, you can check the presence or absence of the parent element adjacent and generally anything to uniquely identify the desired DOM element.

Find more questions by tags XPath