I am writing a test script using Selenium web driver (IE). I had no luck trying to get a popup login to display (in iframe) via click. It is an asp.net web application and this is the html that is rendered:
<span class='loggedOut'>
<a class='logInOut logIn popupLink' href='#'>Log In</a>
<span class='divider mini-hidden'>|</span>
<a class='logInOut register mini-hidden' href='/Forms/Registration.aspx'>Register</a>
</span>
This is the selenuim syntax that I have used, nothing worked:
lbi.findElement(By.xpath("//div[@class='logInOut logIn popupLink']")).click();
or
lbi.findElement(By.classname("logInOut logIn popupLink")).click();
or
lbi.findElement(By.ByLinkText("Log In")).click();
I add to use .sendkeys method and send “Enter” as a key. It did the trick in IE8.