Tried level best To Record the clicking action of Google Autocomplete

I am in process of making decision between cypress.io and katalon and I am really sorry to disclose katalon doesn’t able to record the clicking action of Google Autocomplete feature ,but cypress was able to do it very easily.I am no where affiliated to cypress,but being a impressive katalon consumer for about year now, I think this feature is a must to co-exist with other tools

Tried with Katalon Recorder( both web plug in and katalon studio )…all I tried was to waitforelement fetaure of katalon so as to ascertain Googleautocomplete drop down is present and detected by katalon.But failed all the times.

Please let me know a solution or add recording feature of google autocomplete drop downs.

Below is screenshot of application

Here is my script
import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import internal.GlobalVariable as GlobalVariable

WebUI.openBrowser(‘’)

WebUI.navigateToUrl(‘weburl’)

WebUI.setText(findTestObject(‘Object Repository/Page_event-reservations-web/input_Find Events Near You_map’), ‘renton’)

WebUI.waitForElementPresent(findTestObject(‘Object Repository/Object Repository/Google Autocomplete’), 5)

selenium.click(‘xpath=(.//*[normalize-space(text()) and normalize-space(.)=\‘Search\’])[1]/i[1]’)

Here is error console:-
10-02-2018 10:54:40 AM - [INFO] - Finding web element with id: ‘Object Repository/Object Repository/Google Autocomplete’ located by 'By.xpath: ’ in ‘5’ second(s)
10-02-2018 10:54:46 AM - [INFO] - Found web element with id: ‘Object Repository/Object Repository/Google Autocomplete’ using heuristic method. Matching attributes: [xpath].
10-02-2018 10:54:46 AM - [INFO] - Web element found by heuristic method is not used because we can’t guarantee it reflects the intended element.
10-02-2018 10:54:46 AM - [INFO] - You should consult our guide in choosing attributes : https://docs.katalon.com/x/fhlO
10-02-2018 10:54:46 AM - [INFO] - Web element found by trial and error method is not used because we can’t guarantee it reflects the intended element.
10-02-2018 10:54:46 AM - [WARNING] - Object ‘Object Repository/Object Repository/Google Autocomplete’ is not present after 5 second(s)
10-02-2018 10:54:46 AM - [END] - End action : waitForElementPresent

1.PNG

I am also looking for the answers of this query.

@Tarun @balmikikalyani Sorry I know the question was months ago but are you still using Katalon Studio? Could you please try again with the latest release?

Based on your logs I suggest using the recorded XPath instead of ID for looking up the element.

After recording the testcase add Send Keys Web UI keyword after the object which has autosuggest and the object will be same which captures the autosuggest and in input filed add TAB key.
This will capture the first option amongst the auto suggest list. You can also use up down arrows to navigate through options.

I mentioned this to @YoungNgo a while ago:

Katalon Studio should support and host cypress.io projects.

I imagine the ability to call a cypress test case(s) from a KatalonTC, making the Katalon TC something like a mini TestSuite.

I hope this is not a case where Katalon have “got religion” over Groovy. In terms of CS evolution, communication and expression of ideas, we need more languages in CS, not fewer.

Just my 2 3 cents (thanks to inflation)

1 Like