cancel
Showing results for 
Search instead for 
Did you mean: 

Groovy script to click a link and verify something on the screen like Texts

New Contributor

Groovy script to click a link and verify something on the screen like Texts

Hi, can someone suggest me how to write Groovy script to click a link and verify something on the screen like Texts

1 REPLY 1
Super Contributor

Re: Groovy script to click a link and verify something on the screen like Texts

If you are using ReadyAPI, then you can use selenium script to click a link and verify anything. Below is the pseudo code snippet:-

 

WebElement elem = driver.findElement(By.id("locator_object")).click();
WebElement elem1 = driver.findElement(By.xpath("locator_object").getText()

And below is the link to set up selenium-integration with Ready API.

https://community.smartbear.com/t5/SoapUI-Pro/Simple-Functional-Web-Testing/m-p/178221#M40572

Hope, this helps you out.