WebUI.click() keyword sometimes is clickable and unclickable when executing the test in different environments.
Since Selenium 3, the maximum browser is providing their respective browser driver, which implements WebDriver API. Selenium communicates to these browser drivers through HTTP commands, and these drivers speak natively with the browser. Official documentation of Selenium says:
“Selenium-WebDriver makes direct calls to the browser using each browser’s native support for automation. “
We can say that the way chrome browser allows a click on a web element may be different from other browsers.
Also, when we click on a WebElement using Selenium WebDriver, it checks two preconditions before clicking:
The element must be visible.
It must have a height and width greater than 0.
If preconditions are not satisfied, you will get exceptions stating the element is not clickable or interactable. Refer click() method in the official document here.
click() is used with supported elements (such as an
<input>), it fires the element's click event. Reference here.
import com.kms.katalon.core.webui.common.WebUiCommonHelper as WebUiCommonHelper
import org.openqa.selenium.WebElement as WebElement