I am using Selenium
for HCI tests, but Selenium
couldn't find an element that was visible, intrigued, I searched it and came to the conclusion that, the element is visible but not present in the DOM.
I may be mistaken (likely), but it's what it seems to be for me.
I have a website with an element, Parcourir
:
When I click on it, I can see this div
element:
Here is the problem now, There is an element Bibliothèque
at the top of the window, when I open the Browser Developer Tools, and inspect it, I find its id and XPath, the element
HTML code is below:
<a href="#media-tab-media_default--media_browser_1"
data-tabid="media_default--media_browser_1" title="Bibliothèque" class="ui-tabs-anchor"
role="presentation" tabindex="-1" id="ui-id-3">
Bibliothèque
</a>
But when I tried to download the DOM, just like its said in this answer:
How can I dump the entire Web DOM in its current state in Chrome?.
I can't find the above element in the DOM, I have an element that I can see in my Browser, which is not present in the DOM.
That's may be why selenium give me the Exception
:
Caused by: org.openqa.selenium.NoSuchElementException: Unable to locate element: //*[@id='ui-id-3']