1

Using Selenium WebDriver I'm not able to click on update profile picture in Facebook. The html snippet is: <div class="_156p">Update Profile Picture</div>

How do I locate the element?

1
  • 2
    Can you provide the html and code you are trying with?
    – saifur
    Commented Dec 15, 2014 at 3:43

1 Answer 1

2

You can identify element using XPATH by utilizing display text as below:

driver.findElement(By.xpath("//div[text()='Update Profile Picture']")).click();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.