How to Press Enter with WebUI?

Wow, you’re totally right: https://github.com/katalon-studio/katalon-studio-testing-framework/blob/64c7915b8d478adac844b7b7da6cd15b38aead4c/Include/scripts/groovy/com/kms/katalon/core/webui/keyword/builtin/SendKeysKeyword.groovy. My bad…

I guess I just assumed that it would work the same way that selenium would. In that case, I’d do exactly that, and just use selenium:

WebElement element = WebUiCommonHelper.findWebElement(findTestObject('Tutorial/Page_Google/input_q'), 30);
element.sendKeys(Keys.ENTER);

I should really open a feature improvement/suggestion for this. There’s no reason that WebUI shouldn’t have this signature available (no good ones that I can think of anyway :face_with_raised_eyebrow:)

3 Likes