如何使用SoapUI运行selenium脚本 - Groovy脚本?

时间:2018-05-22 12:27:12

标签: selenium groovy automation webdriver soapui

我在SoapUI中编写了以下Selenium脚本 - Groovy脚本测试步骤。

    for (InvoiceSubData s : invProperty) {
            if (invNumber.equals(s.getInvoiceNo())) {
                newProperty.add(s);
                continue;
            }



            if (s.getInvoiceNo().contains(invNumber)) {
                newProperty.add(s);
                continue;
            }
        }

在运行上面的脚本时,我立即收到错误弹出窗口:

openBrowser() // Invoke the method from groovy script

public void openBrowser()
{
    System.setProperty("webdriver.chrome.driver", "D:\\selenium\\chromedriver.exe");
    WebDriver driver = new ChromeDriver();
    driver.get("https://stackoverflow.com");
    System.out.println("Application opened");
    System.out.println("Page Title is : "+driver.getTitle());
    driver.quit();
}

供参考:

Chrome浏览器版本:66+
Selenium-alone-server:3.12.0
ChromeDriver版本:2.38

SoapUI工具版本:5.3.0

如何解决从SoapUI工具运行的问题?

注意: 添加 selenium-standalone-server 3.12.0 jar 后,脚本从Eclipse IDE运行:(

谢谢,
Karunagara Pandi

0 个答案:

没有答案