I want to insert ‘Enter’ Keys but failed
This is what I found from guide
==========================================================
https://docs.katalon.com/display/KD/[WebUI]+Send+Keys
'Press Ctrl+A to select all text in txt_Comment'
WebUI.sendKeys(findTestObject(
'txt_Comment'
), Keys.chord(Keys.CONTROL,
'a'
))
==========================================================
Here is my question. What should I do for just hitting 'Enter' keys?
WebUI.sendKeys(
Keys.ENTER
)
Please let me know how to do this
If you just want to hit’ Enter’ key:
WebUI.sendKeys(findTestObject(null), Keys.chord(Keys.ENTER))
1 Like
Could you tell me please, how about if I want to press CTRL + P but there’s no test object I need to mentioned… example I want to press CTRL + P in the browser for print reason the whole page browser, I didn’t need to mentioned the test object right?
Arnel
January 9, 2019, 6:27am
4
Hi DandyDolph,
As per Vinh_Nguyen, just make the target null…
Refer to my comment in the link below:
Hi Kyle,
You can try this. It works for me
WebUI.sendKeys(null, Keys.chord(Keys.CONTROL, ‘v’))
Just make the target null.
Hope that helps. . .
Hope that helps. . .
Hi @Arnel
Already tried but there’s no result
try to define //body or /html or some other top level object as TO to consume keystroke