Seeking to interact with hidden elements using protractor within a Dialog Container (See Image of Dialog Container). Despite trying various options, I have not been successful so far. (tests in chrome)
My Configuration: I/status - selenium standalone version available: 3.141.59 [latest]
I/status - chromedriver versions available: 2.46, 77.0.3865.10, 80.0.3987.16 [latest]
I/status - geckodriver version available: v0.26.0 [latest]
I/status - IEDriverServer is not present
I/status - android-sdk is not present
I/status - appium is not present
First attempt involves utilizing browser actions to scroll down the dialog and locate 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
Second attempt involves using mouseMove to click on the 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.
If anyone has any advice, it would be greatly appreciated! Thank you!
- SOLUTION: Thanks to the community's assistance, I was able to solve my issue using this block of code:
await browser.executeScript("arguments[0].click()", placeSistema);
This solution worked perfectly!