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
| public static String sendhttpGetRequest(String url, String auth) throws Exception, IOException { | |
| HttpGet request = new HttpGet(url); | |
| if (auth != null) { | |
| request.setHeader(HttpHeaders.AUTHORIZATION, auth); | |
| } | |
| request.setHeader("Content-Type", "application/json; charset=UTF-8"); |
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
| public void clickOnMultipleElements(WebElement... elements) { | |
| for (WebElement webElement : elements) { | |
| try { | |
| webElement.click(); | |
| } catch (Exception e) { | |
| // TODO: handle exception | |
| } | |
| } | |
| } |
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
| String response = netUtils.sendhttpGetRequest(url, null); | |
| JSONObject jsonObject = new JSONObject(response); | |
| String result = jsonObject.getJSONObject("value").get("ready").toString(); |
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
| import org.junit.After; | |
| import org.junit.Before; | |
| public class BasicTest { | |
| String testName; | |
| String testId; | |
| String userId;//In case a new user is created for every test | |
| String orderId;//In case a new order is create for every test |
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
| import org.junit.After; | |
| import org.junit.Before; | |
| public class BasicTest { | |
| @Before | |
| public void setup(){ | |
| } | |
| @After |
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 drivers; | |
| import java.net.URL; | |
| import org.openqa.selenium.chrome.ChromeOptions; | |
| import org.openqa.selenium.remote.DesiredCapabilities; | |
| import org.openqa.selenium.remote.RemoteWebDriver; | |
| public class ChromeWebDriver extends GenericWebDriver { |
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 drivers; | |
| import org.junit.Assert; | |
| import org.openqa.selenium.By; | |
| import org.openqa.selenium.WebElement; | |
| import org.openqa.selenium.remote.RemoteWebDriver; | |
| import org.openqa.selenium.support.ui.ExpectedConditions; | |
| import org.openqa.selenium.support.ui.WebDriverWait; | |
| import Enums.ByTypes; |
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
| <profiles> | |
| <profile> | |
| <activation> | |
| </activation> | |
| <id>unitTests</id> | |
| <build> | |
| <plugins> | |
| <plugin> |