Search in sources :

Example 71 with App

use of com.coveros.selenified.application.App in project selenified by Coveros.

the class ActionGoIT method refreshPageErrorTest.

@Test(groups = { "integration", "actions", "go" }, description = "An integration test to check the refreshPage method")
public void refreshPageErrorTest() {
    // use this object to manipulate the app
    App app = this.apps.get();
    // perform some actions
    app.killDriver();
    app.refresh();
    // verify 1 issue
    finish(1);
}
Also used : App(com.coveros.selenified.application.App) Test(org.testng.annotations.Test)

Example 72 with App

use of com.coveros.selenified.application.App in project selenified by Coveros.

the class ActionGoIT method setCookieErrorTest.

@Test(groups = { "integration", "actions", "go" }, description = "An integration test to check the setCookie method")
public void setCookieErrorTest(ITestContext context) throws IOException, ParseException {
    String dateval = "2011-11-17T09:52:13";
    DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
    df.setTimeZone(TimeZone.getTimeZone("UTC"));
    Cookie cookie = new Cookie("new_cookie", "this_cookie", getTestSite(this.getClass().getName(), context).split("/")[2].split(":")[0], "/", df.parse(dateval));
    // use this object to manipulate the app
    App app = this.apps.get();
    // perform some actions
    app.killDriver();
    app.setCookie(cookie);
    // verify 1 issue
    finish(1);
}
Also used : Cookie(org.openqa.selenium.Cookie) App(com.coveros.selenified.application.App) SimpleDateFormat(java.text.SimpleDateFormat) DateFormat(java.text.DateFormat) SimpleDateFormat(java.text.SimpleDateFormat) Test(org.testng.annotations.Test)

Example 73 with App

use of com.coveros.selenified.application.App in project selenified by Coveros.

the class ActionGoIT method deleteAllCookiesTest.

@Test(groups = { "integration", "actions", "go" }, description = "An integration test to check the deleteAllCookies method")
public void deleteAllCookiesTest() {
    // use this object to manipulate the app
    App app = this.apps.get();
    // perform some actions
    app.deleteAllCookies();
    Cookie cookie = app.get().cookie("cookie");
    org.testng.Assert.assertNull(cookie);
    // verify no issues
    finish();
}
Also used : App(com.coveros.selenified.application.App) Cookie(org.openqa.selenium.Cookie) Test(org.testng.annotations.Test)

Example 74 with App

use of com.coveros.selenified.application.App in project selenified by Coveros.

the class ActionIsIT method isAlertPresentTest.

@Test(groups = { "integration", "actions", "is" }, description = "An integration test to check the isAlertPresent method")
public void isAlertPresentTest() {
    // use this object to manipulate the app
    App app = this.apps.get();
    // perform some actions
    app.newElement(Locator.ID, "disable_click").click();
    app.newElement(Locator.ID, "alert_button").click();
    Assert.assertTrue(app.is().alertPresent());
    // verify no issues
    finish();
}
Also used : App(com.coveros.selenified.application.App) Test(org.testng.annotations.Test)

Example 75 with App

use of com.coveros.selenified.application.App in project selenified by Coveros.

the class ActionIsIT method isElementTextAreaTest.

@Test(groups = { "integration", "actions", "is" }, description = "An integration test to check if an element is input")
public void isElementTextAreaTest() {
    // use this object to manipulate the app
    App app = this.apps.get();
    // perform some actions
    Assert.assertTrue(app.newElement(Locator.ID, "textarea_input").is().input());
    // verify no issues
    finish();
}
Also used : App(com.coveros.selenified.application.App) Test(org.testng.annotations.Test)

Aggregations

App (com.coveros.selenified.application.App)501 Test (org.testng.annotations.Test)500 WebElement (org.openqa.selenium.WebElement)15 Cookie (org.openqa.selenium.Cookie)7 Element (com.coveros.selenified.element.Element)6 DateFormat (java.text.DateFormat)4 SimpleDateFormat (java.text.SimpleDateFormat)4 DesiredCapabilities (org.openqa.selenium.remote.DesiredCapabilities)4 File (java.io.File)2 InvalidBrowserException (com.coveros.selenified.exceptions.InvalidBrowserException)1 Call (com.coveros.selenified.services.Call)1 HTTP (com.coveros.selenified.services.HTTP)1 MalformedURLException (java.net.MalformedURLException)1