I have a problem with finding web elements in my web application. When I use Selenium IDE everything is ok, the element can be found. In Firebug or Chrome developer tools is ok as well (element is found by xpath). But when I use the same xpath expression in FirePath or FireFinder or WebDriver script (java) there are any element found. This is html code of example element:

<input id="btnWyloguj" class="Button80" type="submit" name="btnWyloguj" value="Wyloguj" style="background-color: rgb(212, 208, 200);">

and this is my xpath: //input[@id='btnWyloguj']
I tried css selectors as well and result is the same. Has anyone had similiar problem?

1 Answer 1


I found the solution myself. As it turns out, elements I wanted to find was inside iframe tags. Iframe is like second inner document, but xpath can work only on 1 document. I used driver.switchTo().frame("frameId"); command and my webdriver script is working now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.