Hi helpful people in my PC.
I have done a search but I havent quite seen anything to cover my dilemma.
I have a website that I want Katalon to randomly click on a button on the page. At the moment, I am filtering it and it clicks the first one on the page, but I would like it to click on others. My page is similar to this one (Its not Tui that I work for, I just borrowed their page)
and all of the “buttons” are like this (hidden company info)
so how would I get Katalon to randomly click one of the buttons? the products change in test so im a little bit stuck on what I could do.
This is my test
WebUI.click(findTestObject('Search filter drop down/filter))
WebUI.click(findTestObject(‘Search filter drop down/filter2’))
WebUI.click(findTestObject(‘Search filter drop down/filter3’))
WebUI.delay(2)
WebUI.click(findTestObject(‘Search filter drop down/Both/FilterButton’))
WebUI.delay(2)
WebUI.click(findTestObject(‘Search filter drop down/hotel’))
WebUI.click(findTestObject(‘Search filter drop down/Both/DepartureDate’))
WebUI.click(findTestObject(‘Search filter drop down/HighestPrices’))
not_run: WebUI.click(findTestObject(‘Search filter drop down/Both/Page2Results’))
WebUI.delay(2)
WebUI.click(findTestObject(‘Search filter drop down/Both/Cruise button (U)’))
WebUI.delay(5)
String Availiability1 = ‘document.querySelector(“.pricebutton”).click()’
WebUI.executeJavaScript(Availiability1, null )
thanking you in advance for any input you can give.