Skip to content

Instantly share code, notes, and snippets.

View bharadwaj-pendyala's full-sized avatar
:electron:
Focusing

Bharadwaj Pendyala bharadwaj-pendyala

:electron:
Focusing
View GitHub Profile
@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"}
};
}
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"));
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;
public enum DriverOptions {
CHROME,
FIREFOX;
EDGE;
}
public class DriverFactoryManager {
public static DriverFactory getManager(DriverOptions type) {
DriverFactory driverManager;
switch (type) {
case CHROME:
driverManager = new ChromeDriverManager();
break;
case FIREFOX:
import org.openqa.selenium.WebDriver;
import java.io.IOException;
public abstract class DriverFactory {
protected WebDriver driver;
protected abstract void startBrowser() throws IOException;
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;
@bharadwaj-pendyala
bharadwaj-pendyala / git-clearHistory
Created July 4, 2020 14:34 — forked from stephenhardy/git-clearHistory
Steps to clear out the history of a git/github repository
-- 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
/*
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) {
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];
}