Package jp.vmi.selenium.selenese.command

Examples of jp.vmi.selenium.selenese.command.CommandFactory


    /**
     * Test of getEval with "storedVars". (old style)
     */
    @Test
    public void evalWithStoredVars() {
        CommandFactory cf = runner.getCommandFactory();
        cf.registerUserDefinedCommandFactory(new UserDefinedCommandFactory() {
            @Override
            public Command newCommand(int index, String name, String... args) {
                if (!"setBoolean".equals(name))
                    return null;
                return new Command(index, name, args, 2) {
View Full Code Here


    @Ignore
    @Test
    public void generateHtmlResultOld() throws Exception {
        File root = getTmpRoot();
        Runner runner = new Runner();
        CommandFactory cf = runner.getCommandFactory();
        runner.setDriver(new HtmlUnitDriver(true));
        String s1name = "suite1";
        TestSuite s1 = Binder.newTestSuite(filename(root, s1name), s1name, runner);
        String s2name = "suite2";
        TestSuite s2 = Binder.newTestSuite(filename(root, s2name), s2name, runner);
        String c1name = "case1";
        TestCase c1 = Binder.newTestCase(filename(root, c1name), c1name, runner, "http://localhost");
        c1.addCommand(cf.newCommand(0, "echo", "c1"));
        String c2name = "case2";
        TestCase c2 = Binder.newTestCase(filename(root, c2name), c2name, runner, "http://localhost");
        c2.addCommand(cf.newCommand(0, "echo", "c2"));
        s2.addSelenese(c2);
        s1.addSelenese(c1);
        s1.addSelenese(s2);
        runner.setHtmlResultDir(root.getPath());
        s1.execute(null, runner);
View Full Code Here

            Assume.assumeNoException(e);
        }
        runner.setDriver(driver);
        runner.setHtmlResultDir(new File(root, "html").getPath());
        runner.setScreenshotAllDir(new File(root, "img").getPath());
        CommandFactory cf = runner.getCommandFactory();
        String s1name = "suite1";
        TestSuite s1 = Binder.newTestSuite(filename(root, s1name), s1name);
        String s2name = "suite2";
        TestSuite s2 = Binder.newTestSuite(filename(root, s2name), s2name);
        String c1name = "case1";
View Full Code Here

    @Test
    public void javascriptBlock() {
        Runner runner = new Runner();
        runner.setDriver(driver);
        runner.setOverridingBaseURL(wsr.getBaseURL());
        CommandFactory cf = runner.getCommandFactory();
        TestCase testCase = Binder.newTestCase("dummy", "dummy", wsr.getBaseURL());
        testCase.addCommand(cf, "open", "/index.html");
        testCase.addCommand(cf, "store", "javascript{'x'}", "a");
        runner.execute(testCase);
        assertThat(runner.getVarsMap().get("a").toString(), equalTo("x"));
View Full Code Here

    public Runner() {
        this.ps = DEFAULT_PRINT_STREAM;
        this.eval = new Eval(this);
        this.elementFinder = new WebDriverElementFinder();
        this.subCommandMap = new SubCommandMap(this);
        this.commandFactory = new CommandFactory(this);
        this.varsMap = new VarsMap();
        this.styleBackups = new ArrayDeque<HighlightStyleBackup>();
    }
View Full Code Here

TOP

Related Classes of jp.vmi.selenium.selenese.command.CommandFactory

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.