add custom cookie with selenium webdriver

  • 26
    Jun

    add custom cookie with selenium webdriver

    package SeleniumPractice; import java.text.ParseException; import java.util.Set; import java.util.concurrent.TimeUnit; import org.openqa.selenium.Cookie; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.testng.annotations.Test; public class AddCookiesInSelenium { WebDriver driver; @Test public void enterText() throws InterruptedException, ParseException...

    Read More
  • 26
    Jun

    Multithreaded initializing of browsers with Selenium web driver

    Internet Explorer Driver InternetExplorerDriver is a standalone server which implements WebDriver’s wire protocol. This driver has been tested with IE 7, 8, 9, 10, and 11 on appropriate combinations...

    Read More
  • 26
    Jun

    starting a Winium server and test execute sample application

    public class myfirstClass { public static void main(String args) throws IOException, InterruptedException { WiniumDriver driver = null; DesktopOptions options = null; WiniumDriverService service = null; WebDriverWait wait = null;...

    Read More
  • 26
    Jun

    read the contents of csv file as Map>

    /* * Read all contents of atmTransactionFile into Map<index, List<String, String>> */ public Map<Integer, List<String>> readCSVFile(String fileName) { int rowdata1= 0; String csvRow = null; List<String> rowData = new...

    Read More
  • 26
    Jun

    get number of columns in a csv file

    /* * Get number of columns in a CSV File Input: CSVFileName Output: integer * numberOfColumns or numberOfHeaders */ public int getNumberOfColumns(String fileName) { int columns = 0; String...

    Read More
  • 26
    Jun

    get row number where first column matches to given value

    /* * Get row number where first column contains specific value */ public int getRowId(String fileName, String valueToSearch) { int rows = 0; String currentRow; try (BufferedReader csvDataFile =...

    Read More
  • 26
    Jun

    get number of rows in csvDataFile

    /* * Get number of rows in a CSV File Input: CSVFileName Output: integer * numberOfRows or 0 if only header is found */ public int getNumberOfRows(String fileName) {...

    Read More
  • 26
    Jun

    get headers of a csv file as list output

    /* * Get headers of a csv file as list output */ public List<String> getHeaders(String fileName) { List<String> headers = new ArrayList<String>(); try (BufferedReader csvDataFromFile = new BufferedReader(new FileReader(fileName)))...

    Read More
  • 26
    Jun

    get column header’s position in CSV File

    /* * Get header position in CSV File Input: CSV File Name, Header name Returns * HeaderPosition (index of 0 to n) or 999 if no match found */...

    Read More
  • 26
    Jun

    Get number of columns in a CSV File

    /* * Get number of columns in a CSV File *Input: CSVFileName *Output: integer  depicting numberOfColumns or numberOfHeaders */ public int getNumberOfColumns(String fileName) { int columns = 0; String...

    Read More