How to control browser using ReadyAPI?
- 8 years ago
I followed the link you shared and after some googling and trouble shooting was able to launch the browser.
Thanks for the response.
Issue-
Earlier had copied all my selenium jars to bin/ext folder.
Now i have copied all the selenium jars to lib folder.
you need to update jars with latest(delete the old jars in that folder) -
httpcore-x.x.x
httpclient-x.x.x
gauva
gson
Restart ReadyAPI, run following code to open browser-
*********************************************
import org.openqa.selenium.*
import org.openqa.selenium.chrome.ChromeDriver
import java.util.concurrent.TimeUnit//Initiate WebDriver
System.setProperty("webdriver.chrome.driver", "filePath/chromedriver.exe");
log.info(System.getProperty("webdriver.chrome.driver"));WebDriver driver=new ChromeDriver()
//Setup Environment
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS)
driver.get("http://www.apc.com");//Your Code
Thread.sleep(10000)
driver.quit()**************************************