Automating doesn't just involve navigating and clicking through links. It's useful for switching tabs, finding broken links, and even dragging and dropping. The passing of values to text fields is one of the most important aspects of test automation. By using the sendKeys() method, we'll learn how this helps us pass values to text fields.
The sendKeys() method in Katalon is used to enter editable text and password content during the execution of tests. Locators such as name, class, and id are used to identify these fields. A web element provides this method. The sendKeys() method does not replace existing text in any text box. sendKeys() can also be used to click the buttons automatically. sendKeys() provides the facility to simulate keystroke events on the specified element in software testing services.
Following are the steps for using Send Keys in Katalon:
A simple example is WebUI.sendKeys(findTestObject(‘Object location’), Keys.chord(Keys.ENTER))