i'm trying to interact with some hidden elements with protractor in a Dialog Container ( Image of Dialog Container ), so i tryed so many options but I did not succeed in any. (tests in chrome)
My setup: I/status - selenium standalone version available: 3.141.59 [last]
I/status - chromedriver versions available: 2.46, 77.0.3865.10, 80.0.3987.16 [last]
I/status - geckodriver version available: v0.26.0 [last]
I/status - IEDriverServer is not present
I/status - android-sdk is not present
I/status - appium is not present
1st attempt use browser actions to pagedown the dialog and find the hidden elements:
placeSistema = element(by.css('element(by.css('[placeholder = "Sistema"]'))
this.clicaCampoSistema = async function () {
await browser.actions().sendKeys(protractor.Key.PAGE_DOWN).perform();
await placeSistem.click();
}
Failed: sendKeysToActiveElement
2st attempt use mouseMove to click on hidden element:
placeSistema = element(by.css('element(by.css('[placeholder = "Sistema"]'))
this.clicaCampoSistema = async function () {
await browser.actions().mouseMove(placeSistema).click().perform();
}
Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
Anyone has a advice? Thank you so much!!!
- SOLUTION: With the help of the community i used this block of code to solve my question
await browser.executeScript("arguments[0].click()", placeSistema);
This worked very well!