0

I have a script to sign up for a facebook account which is done automatically as in the picture below:

enter image description here

I now want to extract what I have written so I have tried the following code but nothin appears?

    WebElement fNameText = driver.findElement(By.name("firstname"));
    String Txt = fNameText.getText();
    System.out.println(Txt);
squathub
  • 33
  • 1
  • 7

1 Answers1

1

You can use String Txt = fNameText.getAttribute("value"); to get the value in the textbox

Guy
  • 46,488
  • 10
  • 44
  • 88
Konduru939
  • 55
  • 1
  • 6