Created
December 18, 2022 10:38
-
-
Save handakumbura/7af62940c7002c076b05a71bcdd55d22 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.dumiduh; | |
import com.dumiduh.constants.Constants; | |
import io.github.bonigarcia.wdm.WebDriverManager; | |
import org.openqa.selenium.chrome.ChromeDriver; | |
import org.testng.Assert; | |
import org.testng.annotations.AfterClass; | |
import org.testng.annotations.BeforeClass; | |
import org.testng.annotations.Test; | |
public class CustomeLocatorTest { | |
private static ChromeDriver driver; | |
@BeforeClass | |
public static void setup() { | |
WebDriverManager.chromedriver().setup(); | |
driver = new ChromeDriver(); | |
driver.get(Constants.DYNAMIC_LOAD); | |
} | |
@Test | |
public static void byContainsText() { | |
Assert.assertTrue(driver.findElement(CustomBy.containsText("Powered by")).isDisplayed(), "the expected text value was not found in the html document."); | |
} | |
@AfterClass | |
public static void cleanUp() { | |
driver.quit(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment