diff --git a/README.md b/README.md index 6b05abe..2f02b06 100644 --- a/README.md +++ b/README.md @@ -42,4 +42,8 @@ Whenever any change is pushed to binary-static/gh-pages it automatically submits Tests are running against binary staging site and whenever any tests fail on binary-static-ci it will send an email notification to concerned persons.Front-end team will make the fix the issues in staging itself before any release to production. +Execution by pointing to QA environment + +Supported only when execution is on local machine in Binary's network otherwise it will be blocked by duo. All test accounts mentioned in `Constants.java` should exist in QA environment. + diff --git a/src/test/java/pageObjects/Mailinator_Page.java b/src/test/java/pageObjects/Mailinator_Page.java index 968ae2d..f6d0d60 100644 --- a/src/test/java/pageObjects/Mailinator_Page.java +++ b/src/test/java/pageObjects/Mailinator_Page.java @@ -26,7 +26,7 @@ public static WebElement withdrawal_email(WebDriver driver) { public static WebElement withdrawal_token(WebDriver driver) { //Switching frame as token is in another frame driver.switchTo().frame("msg_body"); - element = CommonFunctions.FindElementWithExplicitWait(driver, By.xpath("/html/body/center/table/tbody/tr/td/table/tbody/tr[2]/td/table/tbody/tr/td/div/p[3]/span")); + element = CommonFunctions.FindElementWithExplicitWait(driver, By.xpath("/html/body/center/table/tbody/tr/td/table/tbody/tr[2]/td/table/tbody/tr/td/p[3]/span")); return element; } diff --git a/src/test/java/testCases/BaseClass.java b/src/test/java/testCases/BaseClass.java index 249de82..83bb9da 100644 --- a/src/test/java/testCases/BaseClass.java +++ b/src/test/java/testCases/BaseClass.java @@ -15,6 +15,9 @@ import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; +import appModules.ChangeAPIEndpoint_Action; + + import utility.Constant; import com.browserstack.local.Local; import org.json.simple.JSONObject; @@ -42,7 +45,8 @@ public void setupApplication(String config_file, String environment) throws Exce options.setExperimentalOption("prefs", prefs); options.addArguments("start-maximized");//workaround for driver.manage().window.maximize() as it breaks on Chrome 60x on TravisCI driver = new ChromeDriver(options); - //driver.manage().window().maximize(); + driver.get(Constant.Endpoint_url); + ChangeAPIEndpoint_Action.Execute(driver, Constant.AppID, Constant.Server); driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS); driver.get(Constant.URL); diff --git a/src/test/java/utility/Constant.java b/src/test/java/utility/Constant.java index 512581c..36206d7 100644 --- a/src/test/java/utility/Constant.java +++ b/src/test/java/utility/Constant.java @@ -18,7 +18,7 @@ public class Constant { public static final String URL_LostPass = "https://staging.binary.com/en/user/lost_passwordws.html"; public static final String Endpoint_url = "https://staging.binary.com/en/endpoint.html"; public static final String Server = "blue.binaryws.com"; - public static final String AppID = "1097"; + public static final String AppID = "1098"; public static final String select_value = ""; public static final String fx_trading_exerience = "Over 3 years"; public static final String fx_trading_frequency = "40 transactions or more in the past 12 months";