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
    Dec 15 '14 at 3:43
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, privacy policy and cookie policy

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