Forum Discussion
I've seen posts here on the forums of loading a Selenium driver into Groovy and using that to automate / interact with webpages in ReadyAPI with a groovy test step. It looks lik Geb is similar and is built to work in groovy. Does Geb come with a jar file or something similar? If so, you can load it into ReadyAPI and import it into the groovy script test steps and use it that way.
This page lists that you can get a Geb jar, and references Selenium jars as well. https://www.softwaretestinghelp.com/geb-tutorial-browser-automation-testing-using-geb-tool/
You would likely need those and would need to load them into ReadyAPI by placing them in the ReadyApi\bin\ext folder, I believe. Then restart ReadyAPI.
- PrakashKannan7 years agoContributor
Thanks . I accessed the selenium in ReadyAPI.
1. Got all the Selenium jars & drivers and kept in custom folder called 'lib' - C:\Program Files\SmartBear\ReadyAPI-2.4.0_1\bin\lib
2.Referred this folder in preference> ReadyAPI > Custom Java Libraries & restarted the ReadyAPI
3. Accessed driver via groovy script test step
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;System.setProperty("webdriver.gecko.driver", "C:/Program Files/SmartBear/ReadyAPI-2.4.0_1/bin/lib/geckodriver.exe");
def driver= new FirefoxDriver()
driver.get("http://www.google.com")
driver.close()