Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 97790

hiding your password in java class file for a test case

$
0
0

I am trying to write a selenium test case which will be put on company jenkins server where all the employee will have access to every java files I create.

public static void main(String[] args) {


    WebDriver driver = new FirefoxDriver();

    driver.get("http://somesite.com");

    driver.manage().window().maximize();

    driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); 



    WebElement userName=driver.findElement(By.xpath(".//*[@id='username']"));
    userName.clear();
    userName.sendKeys("someName@somecompany.com");

    WebElement password=driver.findElement(By.xpath(".//*[@id='password']"));
    passwordclear();
    password.sendKeys("password");
    password.submit();

   driver.quit();

What I want to do is not show the "password" there, I don't want other employees to see my password. Is there any way I can do that?


Viewing all articles
Browse latest Browse all 97790

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>