Encode Password using Base64 Java - Selenium Webdriver



One of the most common practice while automating websites which have passwords and other personal information  is encoding.

Base64 is a method of encoding every 3 bytes of input into 4 bytes of output; it is commonly used to encode photos or audio to send in emails, and a way to hide webpage authentication from casual snooping. Here is an example of how to code a Base64 encoder in Java for Selenium WebDriver:

 import.org.apche.commons.codec.binary.Base64

WebDriver wd = new FirefoxDriver();
WebElement pwd = wd.findElement(By.id("passwd"));

byte[] encodedBytes = Base64.encodeBase64("TextforEncoding".getBytes());
System.out.println("encodedBytes " + new String(encodedBytes));
byte[] decodedBytes = Base64.decodeBase64(encodedBytes);
System.out.println("decodedBytes " + new String(decodedBytes));

Happy Encoding!

Comments

  1. Replies
    1. Anonymous20/4/22

      Encode Password Using Base64 Java - Selenium Webdriver >>>>> Download Now

      >>>>> Download Full

      Encode Password Using Base64 Java - Selenium Webdriver >>>>> Download LINK

      >>>>> Download Now

      Encode Password Using Base64 Java - Selenium Webdriver >>>>> Download Full

      >>>>> Download LINK nH

      Delete
  2. Very useful article! I would like to know If i want to check whether the password is masked or not then is it possible to check using Base64 class? or if not then which way we can implement using selenium & java! Thanks!

    ReplyDelete
  3. Anonymous20/4/22

    Encode Password Using Base64 Java - Selenium Webdriver >>>>> Download Now

    >>>>> Download Full

    Encode Password Using Base64 Java - Selenium Webdriver >>>>> Download LINK

    >>>>> Download Now

    Encode Password Using Base64 Java - Selenium Webdriver >>>>> Download Full

    >>>>> Download LINK zJ

    ReplyDelete

Post a Comment

Popular posts from this blog

Software Testing @ Microsoft

Trim / Remove spaces in Xpath?