In a Selenium test, we open a menu like this:
This works fine the 1st time.
If we duplicate those lines, the 2nd call to waitForElementClickable() will hang because the menu is already opened and is not considered clickable.
Is waitForElementClickable() the appropriate API call for menu availability (be it open or closed) ?
Do we need to explicitly close the menu when we're done with it ? If so, what is the best practice ? (I'd not want to have to force a click action on a bogus element just to have the menu closed)
Thanks !
Code:
final By by = ByScLocator.scLocator(locatorValue); driver.waitForElementClickable(by); final WebElement webElement = driver.findElement(by); actions.click(webElement).perform();
If we duplicate those lines, the 2nd call to waitForElementClickable() will hang because the menu is already opened and is not considered clickable.
Is waitForElementClickable() the appropriate API call for menu availability (be it open or closed) ?
Do we need to explicitly close the menu when we're done with it ? If so, what is the best practice ? (I'd not want to have to force a click action on a bogus element just to have the menu closed)
Thanks !
Comment