How to enter password in the password textbox using ID locator in facebook?

0 votes
I am new to selenium and testing the web element of password textbox. I am unable to locate it using the name tag. Can someone help?
Dec 18, 2018 in Selenium by Anjali
• 2,900 points
27 views

1 answer to this question.

0 votes

Here as you can see that the textbox for password is having an ID called pass, we will use this to access the password textbox.

See the code that I used here:

driver.get("https://www.facebook.com");
driver.findElement(By.id("pass")).sendKeys("pa55word");

You can see here that I used Locator ID to find the element i.e. password textbox and I have sent the character sequence i.e. the password. Hope this helps.

answered Dec 18, 2018 by Nabarupa

Related Questions In Selenium

0 votes
1 answer
+4 votes
1 answer
+1 vote
1 answer
0 votes
1 answer

How to scroll the Page up or down in Selenium WebDriver? (using java)

Its pretty simple. Check out the below ...READ MORE

answered Apr 5, 2018 in Selenium by nsv999
• 5,050 points
5,807 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,050 points
272 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
639 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
264 views
0 votes
1 answer
+9 votes
13 answers

How to automate gmail login process using selenium webdriver in java?

Check the below code: Here is the working ...READ MORE

answered Apr 24, 2018 in Selenium by Vardy
• 2,280 points
48,059 views