Package jp.vmi.selenium.selenese

Examples of jp.vmi.selenium.selenese.Runner


    @Test
    public void test() throws IOException {
        WebDriverManager wdm = WebDriverManager.getInstance();
        wdm.setWebDriverFactory(WebDriverManager.HTMLUNIT);
        wdm.setDriverOptions(new DriverOptions());
        Runner runner = new Runner();
        runner.setDriver(wdm.get());
        CommandFactory cf = runner.getCommandFactory();

        File selenesefile = File.createTempFile("selenese", ".html");
        TestCase testCase = Binder.newTestCase(selenesefile.getPath(), "test", "http://example.co.jp");
        testCase.addCommand(cf, "store", wsr.getBaseURL(), "url");
        testCase.addCommand(cf, "open", "${url}");
        testCase.addCommand(cf, "pause", "1000");
        runner.execute(testCase);
        assertThat(runner.getWrappedDriver().getCurrentUrl(), is(wsr.getBaseURL()));
    }
View Full Code Here


        return locators;
    }

    @Override
    public final Result execute(Context context, String... curArgs) {
        Runner runner = (Runner) context;
        TestCase testCase = runner.getCurrentTestCase();
        try {
            result = doCommandImpl(testCase, runner);
        } catch (RuntimeException e) {
            result = new Error(e);
        }
        ICommand next = next(testCase);
        if (next != NEXT)
            runner.getCommandListIterator().jumpTo(null);
        return result;
    }
View Full Code Here

TOP

Related Classes of jp.vmi.selenium.selenese.Runner

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.