Working with Protractor by Bruno Baia v0.9.2 Selenium Webdriver v3.0.1 Selenium.Webdriver.ChromeDriver v2.27.0 I'm facing the following problem. I'm logging in from a non Angular page. When I'm on the first Angular page of my application I want to click on the first row of a NgRepeater on the page as follows:
class CarCompanies
{
NgWebDriver driver;
[FindsBy(How = How.XPath, Using = "Bedrij")]
private IWebElement linkBedrijven;
public bool ContainsText(string text, string heading)
{
return SelecteerElement.pageContainsHeadingElementWithText(driver, text, heading);
}
public void ClickFirstCar()
{
driver.FindElements(NgBy.Repeater("dmsInstance in dmsInstanceList"))[0].Click();
}
public CarCompanies(NgWebDriver driver)
{
this.driver = driver;
PageFactory.InitElements(driver, this);
}
}
This works fine when the preceding statement is a Thread.Sleep()
but without this unwanted Sleep an IndexOutOfRangeException
appears. The driver tells meIgnoreSynchronisation = false
isAngular2 = false
.
What am I doing wrong?