In selenium we have to used clear keyword for clearing watermark effect but in katalon studio there is not keyword.
Try this method:
def ClearTextField(TestObject to) { WebUI.sendKeys(to, Keys.chord(Keys.CONTROL, 'a')) WebUI.sendKeys(to, Keys.chord(Keys.DELETE)) }
Keys.chord(Keys.CONTROL, âaâ)) doesnât work on Mac OS.
I used :
WebUI.doubleClick(obj_repository)
WebUI.sendKeys(obj_repository, Keys.chord(Keys.DELETE))
And it works for me
It shows Underlined below âkeys.chord(Keys.DELETE)â hence my code is not running. What I am missing? Can you please help?
Either you are missing the import statement associated with the Keys reference or you need to be careful how you spell the Keys reference in respect of letter case (you have the k of Keys in lowercaseâit needs to be in uppercase)
import org.openqa.selenium.Keys as Keys
..., Keys.chord(Keys.TAB)
Another way to collect all associated references is to use the CTRL + SHIFT + O (oh) combination. This method gets all necessary import references (and takes away those you donât need).