Currently, my application is in a state where it needs to wait for an iframe using the isElementPresent
method before switching to it.
The issue arises when I encounter trouble within the iFrame itself. I need to ensure that an input
component within the iFrame is visible on the page and ready to accept keys. However, if the page loads slowly, it causes the app to crash with an error message:
ElementNotVisibleError: element not visible
.
Login.prototype.waitForIframeField = function(){
var self = this;
return this.driver.wait(function waitForInputField() {
return self.driver.isElementPresent(self.page.usernameInputField.selector);
}, this.config.driver.defaultTimeout);
}
I have also attempted to use .findElement().isDisplayed()
, but it too encounters the same issue of no such element
being present.