Objectives
This article provides you an example of searching any string on Google website.
The typical purchase flow on a search engine is given below.
- Open Google homepage
- Type anything in the search bar
- Hit go/search button
Prerequisites
- Access to Catchpoint portal with Create/Modify tests permission
Process
- Log in to the Catchpoint Portal and create a Transaction test

- Copy the script below:
// Step - 1 open("http://www.google.com")
waitForNoRequest("3000")
setStepName("1. Google Page")
var string = ${RandomList('book', 'pen', 'phone', laptop, football)}
typeKeys("//*[@name='q']", "${var(string)}")
// Step - 2 clickAndWait(//*[@name="btnG"])
waitForNoRequest("3000")
setStepName("2. Search")
3. Paste the script into the Script Editor and modify the settings accordingly

4. Hit Save and your Transaction test with login script is ready!
