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
| @DataProvider(name = "improvSimplified") | |
| public Object[][] simplifying() { | |
| return new Object[][]{ | |
| {"emial-id#[email protected]", "nmmxuhk", "Women", "Tops", "T-shirts", "Faded Short Sleeve", "Blue", "M"}, | |
| {"emial-id#[email protected]", "mhrwxnh", "Dresses", "Summer Dresses", null, "Printed Chiffon", "Green", "L"}, | |
| {"emial-id#[email protected]", "rwgxdvm", "Women", "Tops", "Blouses", "Blouse", "White", "S"} | |
| }; | |
| } | |
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 class CheckoutTests extends BaseTest { | |
| @Test(dataProvider = "improv", dataProviderClass = CheckoutDataProvider.class) | |
| public void validateOrderConfirmationTest(Map<String,String> checkOutData) { | |
| homePage.navigateToSignIn(); | |
| authenticationPage.loginAs(checkOutData.get("email"), checkOutData.get("password")); | |
| myAccountPage.selectProductCategory(checkOutData.get("category")); | |
| categoryPage.selectSubCategory(checkOutData.get("subCategory")); | |
| categoryPage.selectSubSubCategory(checkOutData.get("subSubCategory")); | |
| categoryPage.openProductByName(checkOutData.get("product")); |
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.openqa.selenium.firefox.FirefoxDriver; | |
| import org.openqa.selenium.firefox.FirefoxOptions; | |
| import org.openqa.selenium.firefox.FirefoxProfile; | |
| import org.openqa.selenium.firefox.GeckoDriverService; | |
| import org.openqa.selenium.remote.DesiredCapabilities; | |
| import java.io.File; | |
| import java.io.IOException; | |
| import java.util.logging.Level; |
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 enum DriverOptions { | |
| CHROME, | |
| FIREFOX; | |
| EDGE; | |
| } |
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 class DriverFactoryManager { | |
| public static DriverFactory getManager(DriverOptions type) { | |
| DriverFactory driverManager; | |
| switch (type) { | |
| case CHROME: | |
| driverManager = new ChromeDriverManager(); | |
| break; | |
| case FIREFOX: |
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.openqa.selenium.WebDriver; | |
| import java.io.IOException; | |
| public abstract class DriverFactory { | |
| protected WebDriver driver; | |
| protected abstract void startBrowser() throws IOException; |
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.openqa.selenium.chrome.ChromeDriver; | |
| import org.openqa.selenium.chrome.ChromeDriverService; | |
| import org.openqa.selenium.chrome.ChromeOptions; | |
| import org.openqa.selenium.remote.DesiredCapabilities; | |
| import java.io.File; | |
| public class ChromeDriverManager extends DriverFactory { | |
| private ChromeDriverService chromeService; |
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
| -- Remove the history from | |
| rm -rf .git | |
| -- recreate the repos from the current content only | |
| git init | |
| git add . | |
| git commit -m "Initial commit" | |
| -- push to the github remote repos ensuring you overwrite history | |
| git remote add origin [email protected]:<YOUR ACCOUNT>/<YOUR REPOS>.git |
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
| /* | |
| Write a program for the below. Given an array of integers, return indices of the two numbers such that they add up to a specific target.Given nums = [2, 7, 11, 15], target = 9, Because nums[0] + nums[1] = 2 + 7 = 9,return [0, 1]. | |
| */ | |
| public class ArraysSumCount{ | |
| public static int[] sumFinder(int[] inputArr, int targetNum){ | |
| for (int i = 0; i < inputArr.length; i++) { | |
| for (int j = i + 1; j < inputArr.length; j++) { | |
| if (inputArr[i] + inputArr[j] == targetNum) { |
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 java.util.*; | |
| public class ArrayAddition{ | |
| static String temp = ""; | |
| public static String addArrayEle(int[] arr){ | |
| for(int i = 0 ; i< arr.length ; i++){ | |
| temp += arr[i]; | |
| } |
NewerOlder