Package jp.vmi.selenium.selenese

Examples of jp.vmi.selenium.selenese.TestCase.addCommand()


        wdm.setDriverOptions(new DriverOptions());
        Runner runner = new Runner();
        runner.setDriver(wdm.get());
        CommandFactory cf = runner.getCommandFactory();
        TestCase testCase = Binder.newTestCase("dummy", "dummy", wsr.getBaseURL());
        testCase.addCommand(cf, "open", "/assertion.html");
        testCase.addCommand(cf, commandName, argument);
        Result result = runner.execute(testCase);
        assertThat(result, is(instanceOf(resultClass)));
    }
}
View Full Code Here


        Runner runner = new Runner();
        runner.setDriver(wdm.get());
        CommandFactory cf = runner.getCommandFactory();
        TestCase testCase = Binder.newTestCase("dummy", "dummy", wsr.getBaseURL());
        testCase.addCommand(cf, "open", "/assertion.html");
        testCase.addCommand(cf, commandName, argument);
        Result result = runner.execute(testCase);
        assertThat(result, is(instanceOf(resultClass)));
    }
}
View Full Code Here

        Runner runner = new Runner();
        runner.setDriver(wdm.get());
        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, "click", "link=linktext");
        Result result = runner.execute(testCase);
        assertThat(result.getMessage(), is("Failure: Element link=linktext not found"));
    }
}
View Full Code Here

        runner.setDriver(wdm.get());
        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, "click", "link=linktext");
        Result result = runner.execute(testCase);
        assertThat(result.getMessage(), is("Failure: Element link=linktext not found"));
    }
}
View Full Code Here

        runner.setDriver(wdm.get());
        runner.setOverridingBaseURL(wsr.getBaseURL());
        CommandFactory cf = runner.getCommandFactory();

        TestCase testCase = Binder.newTestCase("dummy", "dummy", wsr.getBaseURL());
        testCase.addCommand(cf, "open", "/assertion.html");
        testCase.addCommand(cf, "assertTitle", "title", "title");
        Result result = runner.execute(testCase);
        assertThat(result.getMessage(), is("Failure: Assertion failed (Result: [assertion test] / Expected: [title])"));
    }
}
View Full Code Here

        runner.setOverridingBaseURL(wsr.getBaseURL());
        CommandFactory cf = runner.getCommandFactory();

        TestCase testCase = Binder.newTestCase("dummy", "dummy", wsr.getBaseURL());
        testCase.addCommand(cf, "open", "/assertion.html");
        testCase.addCommand(cf, "assertTitle", "title", "title");
        Result result = runner.execute(testCase);
        assertThat(result.getMessage(), is("Failure: Assertion failed (Result: [assertion test] / Expected: [title])"));
    }
}
View Full Code Here

                    return null;
                }
            }
        });
        TestCase testCase = Binder.newTestCase("dummy", "dummy", "http://localhost/");
        testCase.addCommand(cf, "test");
        testCase.addCommand(cf, "echo", "test");
        CommandList commandList = testCase.getCommandList();
        assertThat(commandList.toArray(), is(array(instanceOf(TestCommandNew.class), instanceOf(Echo.class))));
    }
}
View Full Code Here

                }
            }
        });
        TestCase testCase = Binder.newTestCase("dummy", "dummy", "http://localhost/");
        testCase.addCommand(cf, "test");
        testCase.addCommand(cf, "echo", "test");
        CommandList commandList = testCase.getCommandList();
        assertThat(commandList.toArray(), is(array(instanceOf(TestCommandNew.class), instanceOf(Echo.class))));
    }
}
View Full Code Here

        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

        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

TOP
Copyright © 2018 www.massapi.com. 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.