I am trying to login to hotmail, and click the first email that is shown in the emails box. I get a problem, when I'm trying to find the first email.
I've tried to get it in a lot of different ways, but I've wanted to make a test just by finding all the list items li, so I've made a simple function:
public void clickFirstEmail()
{
var lis = driver.FindElements(By.TagName("li")); //this is raising the exception
foreach (var li in lis)
{
MessageBox.Show(li.Text);
}
}
Whenever I try to access some elements, I get this exception: Permission denied to access property '__qosId'
I've seen some answers here on stackoverflow, but I guess they are right when you are running a selenium server.
I start my driver like this:
driver = new FirefoxDriver();
Any ideas on how to get this right ?
The whole plan is to click the first email.
UPDATE: I've tried one more time, and it worked, but it gave me this error now: Element is no longer attached to the DOM on the messagebox.show line.
I am thinking that the page (javascript) is constantly loading/changing new stuff, so what could I do about this ?