Click here to Skip to main content
15,893,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I am creating a script of login/logout for a website.How can i take login credentials values from user in runtime with prompt window like in IDE we use prompt and echo commands.By sendkeys we have to save credentails in code.So please help.. any code snippet will helpful.
Thanks.
Posted
Comments
ZurdoDev 7-May-15 16:58pm    
Need a lot more info. It's not clear what exactly you need.
Sourabh9890 8-May-15 1:24am    
Hello Ryan,
I want to create a script of login/logout for gmail account.As you know for login we have to enter username and password for that in java we use this snippet.
driver.findElement(By.name("Email")).clear();
driver.findElement(By.name("Email")).sendKeys("username");
driver.findElement(By.name("password")).clear();

driver.findElement(By.name("password")).sendKeys("xxxxx");

driver.findElement(By.cssSelector("input.button")).click();

But this code can send only fixed username and password which is filled in code.I want to enter new credentials in each run with prompt.We can do this in IDE using prompt and type commands from this in each run in selenium IDE a prompt window open for username and password.How can we do this in selenium webdriver??

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900