xpath check in selenium

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

xpath check in selenium

ia12 Imran

when i find xapth in website It is correct But when I run my script  It is showing erro

AILED: ProductSearchs
java.lang.NullPointerException
    at Amazon.ProductSearch.ProductSearchs(ProductSearch.java:15)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflec


driver.findElement(By.xpath("//input[@id='twotabsearchtextbox'][@name='field-keywords']")).sendKeys("Iphone");
        driver.findElement(By.xpath("//input[@type='submit'][@value='Go']")).click();
   

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/f9be703c-d1f4-4fc9-b071-3a13edace001%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: xpath check in selenium

Reed Xia
Hi,

What's code for  "at Amazon.ProductSearch.ProductSearchs(ProductSearch.java:15) "? And did you verify your xpath in browser debug tool?

On Thu, May 24, 2018 at 7:41 PM, ia12 Imran <[hidden email]> wrote:

when i find xapth in website It is correct But when I run my script  It is showing erro

AILED: ProductSearchs
java.lang.NullPointerException
    at Amazon.ProductSearch.ProductSearchs(ProductSearch.java:15)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflec


driver.findElement(By.xpath("//input[@id='twotabsearchtextbox'][@name='field-keywords']")).sendKeys("Iphone");
        driver.findElement(By.xpath("//input[@type='submit'][@value='Go']")).click();
   

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/f9be703c-d1f4-4fc9-b071-3a13edace001%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAB_-H08yL9feFAzbnyOd6EnnO6KCVoa1%2BpmsdkzKQMtdKntaiQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.