Getting Nosuchelementexception while following your tutorial

Hi,

Today I started this awesome tutorial but got stucked on a point where i am not able to locate a button on this page.

http://www.toolsqa.com/selenium-webdriver/switch-commands/

I need to click on New Message Window but using name I am not able to click it.
I tried tagName and xpath too but..bad luck.

Please help.

Regards:
Shubham Saxena

Default Asked on February 5, 2015 in Selenium WebDriver.
Add Comment
  • 1 Answer(s)

    I tried using xpath and it worked:

    driver.findElement(By.xpath(“//*[@id=’content’]/p[3]/button”)).click();

    Train Answered on February 19, 2015.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.