Skip to content

Commit

Permalink
Tests for method element(final By locator). Little review fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
EreOo committed Jul 25, 2017
1 parent b6f4f5f commit 5f0d434
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public TestElementPage checkElementBecomeVisible() {
return this;
}

// The element changes coordinates. Each check validates element with different x, y.
public TestElementPage checkAnimationElement() {
element(By.id("myAnimation")).should().beDisplayed();
element(By.id("myAnimation")).should().beDisplayed();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@

import com.wiley.autotest.framework.config.BaseTest;
import com.wiley.autotest.framework.pages.TestElementPage;
import org.openqa.selenium.TimeoutException;
import org.springframework.beans.factory.annotation.Autowired;
import org.testng.annotations.Test;

/**
* Created by shekhavtsov on 21/07/2017.
*/
public class NonexistentElement extends BaseTest {
public class NonexistentElementhrowsException extends BaseTest {

@Autowired
private TestElementPage testElementPage;

@Test(expectedExceptions = Exception.class)
@Test(expectedExceptions = TimeoutException.class)
public void test() {
openPage("mainTestElement.html");
testElementPage.checkElementNotFound();
Expand Down

0 comments on commit 5f0d434

Please sign in to comment.