use of com.seleniumtests.core.runner.cucumber.Fixture in project seleniumRobot by bhecquet.
the class TestFixture method testGetElement.
/**
* Check we can get an element, if present
*/
@Test(groups = { "ut" })
public void testGetElement() {
SeleniumTestsContextManager.getGlobalContext().setCucumberImplementationPackage("com.seleniumtests.ut.core.runner.cucumber");
Assert.assertTrue(new Fixture().getElement("textField").equals("textField"));
Assert.assertTrue(Fixture.getCurrentPage() instanceof PageForActions);
}
use of com.seleniumtests.core.runner.cucumber.Fixture in project seleniumRobot by bhecquet.
the class TestFixture method testGetElementNotPresent.
/**
* Check we get exception if element is not found
*/
@Test(groups = { "ut" }, expectedExceptions = ScenarioException.class)
public void testGetElementNotPresent() {
SeleniumTestsContextManager.getGlobalContext().setCucumberImplementationPackage("com.seleniumtests.ut.core.runner.cucumber");
new Fixture().getElement("textFoo");
}
use of com.seleniumtests.core.runner.cucumber.Fixture in project seleniumRobot by bhecquet.
the class TestFixture method testGetValueWithKnownParam.
@Test(groups = { "ut" })
public void testGetValueWithKnownParam() {
SeleniumTestsContextManager.getGlobalContext().setCucumberImplementationPackage("com.seleniumtests.ut.core.runner.cucumber");
SeleniumTestsContextManager.getThreadContext().getConfiguration().put("foo", new TestVariable("foo", "bar"));
Assert.assertEquals(new Fixture().getValue("{{ foo }}"), "bar");
}
use of com.seleniumtests.core.runner.cucumber.Fixture in project seleniumRobot by bhecquet.
the class TestFixture method testGetElementWithClassName.
@Test(groups = { "ut" })
public void testGetElementWithClassName() {
SeleniumTestsContextManager.getGlobalContext().setCucumberImplementationPackage("com.seleniumtests.ut.core.runner.cucumber");
Assert.assertTrue(new Fixture().getElement("PageForActions.textField").equals("textField"));
Assert.assertTrue(Fixture.getCurrentPage() instanceof PageForActions);
}
Aggregations