Created
October 29, 2020 15:32
-
-
Save cmosguy/19aef9a066acde83c64685f5c01d1ed0 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 test; | |
import io.github.bonigarcia.wdm.WebDriverManager; | |
import org.openqa.selenium.By; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.WebElement; | |
import org.openqa.selenium.chrome.ChromeDriver; | |
import org.testng.annotations.Test; | |
import static org.testng.Assert.assertTrue; | |
public class currencyConverterTest { | |
@Test | |
public void converterTest() { | |
WebDriverManager.chromedriver().setup(); | |
WebDriver driver = new ChromeDriver(); | |
driver.get("https://www.xe.com/"); | |
WebElement amountInput = driver.findElement(By.id("amount")); | |
amountInput.sendKeys("100"); | |
WebElement convertButton = driver.findElement(By.xpath("//button[@data-test-id='converter-submit-button']")); | |
convertButton.click(); | |
WebElement converterResult = driver.findElement(By.className("converterresult-toAmount")); | |
assertTrue(Double.parseDouble(converterResult.getText()) > 84.0); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment