testing - hiding your password in java class file for a test case -
I am making up.
public static zero main (string [] args) {WebDriver driver = new firefox driver (); Driver.get ("http://somesite.com"); . Driver (domain) (maximize window) () .; Driver. Management (). Time ranges (). Vested VAT (10, time unit. SENDS); WebElement userName = driver.findElement (By.xpath (".//*[@ id = 'username']")); userName.clear (); UserName.sendKeys ("someName@somecompany.com"); Web Element Password = Driver. Find Element (Bypass. (".//*. [ID = 'Password']")); Passwordclear (); password.sendKeys ("password"); Password.submit (); driver.quit (); What do I want to do, there is no "password" displayed, I do not want other employees to see my password. Is there any way I can do that?
You can always encrypt it or base 64 or something like this can be done at least plain text , But honestly any kind of hardcod password encryption can be reversed, if they can see the source code.
Comments
Post a Comment