So, now that you are an expert in writing CSS selectors to identify your WebElements (possible because of my older webinar on this topic), you want to write some new tests. You are inspecting the page you will test, identifying what WebElements you will need, and start writing the selectors. Once you have them, and the test contains all the necessary interactions with those WebElements, you run the test, confident it will pass. But instead, surprise. You get a NoSuchElementException. You double, triple, quadruple check the page, and by the looks of it, the selector is correctly written. And that is true. However, when you inspect the page further, you notice that your element is actually contained within an <iframe> tag (<iframe>…</iframe>). Continue reading Iframes, switchTo() and default content with Selenium
