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!
Thankx
ReplyDeleteEncode Password Using Base64 Java - Selenium Webdriver >>>>> Download Now
Delete>>>>> 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
Glad you liked it Ritu!
ReplyDeleteCheers :)
ReplyDeleteVery 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!
ReplyDeleteEncode Password Using Base64 Java - Selenium Webdriver >>>>> Download Now
ReplyDelete>>>>> 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