I have a protractor script running on desktop (chrome,firefox,safari) and iPhone(safari). Its working fine everywhere except iPhone safari. If we run the script, it will click on a link which will open a page on new tab. But it looks like the click() event does not happen. I can tell by looking at the iPhone browser while script is running. The script is as following.
it('click on about room5',function () {
browser.driver.findElement(By.css("a[href='/about']")).click();
browser.driver.sleep(10000);
browser.getAllWindowHandles().then(function(handles) {
browser.switchTo().window(handles[1]);
browser.driver.sleep(sleep);
browser.driver.getCurrentUrl().then(function(url){
expect(url).toBe(baseUrl + "about/");
});
browser.close();
browser.switchTo().window(handles[0]);
});
});
The error I am getting as following:
Message:
Failed: Parameters were incorrect. We wanted {"required":["name"]} and you sent []
I guess I am having this because there is no other window only the current window. Because the click() event did not occur. I am not sure why is this happening. Its even working fine on android chrome as well.
Any idea?
Thanks