org.openqa.selenium.NoSuchElementException

no such element: Unable to locate element: {"method":"xpath","selector":"//div[@class='address-section']//p[contains(text(),'blastandroid')]"} (Session info: chrome=55.0.2883.91) (Driver info: chromedriver=2.25.426935 (820a95b0b81d33e42712f9198c215f703412e1a1),platform=Mac OS X 10.11.3 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 349 milliseconds For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html Build info: version: '2.52.0', revision: '4c2593cfc3689a7fcd7be52549167e5ccc93ad28', time: '2016-02-11 11:22:43' System info: host: 'AnkitGupta04.local', ip: '10.20.86.78', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.3', java.version: '1.8.0_101' Driver info: io.appium.java_client.android.AndroidDriver Capabilities [{appPackage=com.xxx.main, app=/Users/ankit.gupta04/Documents/Automation/xxx-ios-automation/TestSnapdealAutomation/app/xxx-universal-debug6.2.5.apk, networkConnectionEnabled=true, warnings={}, databaseEnabled=false, deviceName=fb04e45f, platform=LINUX, deviceUDID=fb04e45f, appActivity=com.xxx.ui.material.activity.MaterialMainActivity, desired={appPackage=com.xxx.main, app=/Users/ankit.gupta04/Documents/Automation/xxx-ios-automation/TestxxxAutomation/app/Snapdeal-universal-debug6.2.5.apk, appActivity=com.xxx.ui.material.activity.MaterialMainActivity, newCommandTimeout=60000, platformVersion=5.1.5, browserName=, platformName=Android, udid=fb04e45f, deviceName=MI}, newCommandTimeout=60000, platformVersion=5.0.2, webStorageEnabled=false, locationContextEnabled=false, takesScreenshot=true, browserName=, javascriptEnabled=true, platformName=Android, udid=fb04e45f}] Session ID: dc49fb82-611b-4a61-95dc-e1231815c1f5 *** Element info: {Using=xpath, value=//div[@class='address-section']//p[contains(text(),'blastandroid')]}

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web89

Stack trace

  • org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//div[@class='address-section']//p[contains(text(),'blastandroid')]"} (Session info: chrome=55.0.2883.91) (Driver info: chromedriver=2.25.426935 (820a95b0b81d33e42712f9198c215f703412e1a1),platform=Mac OS X 10.11.3 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 349 milliseconds For documentation on this error, please visit: http://seleniumhq.org/exceptions
  • o_such_element.html Build info: version: '2.52.0', revision: '4c2593cfc3689a7fcd7be52549167e5ccc93ad28', time: '2016-02-11 11:22:43' System info: host: 'AnkitGupta04.local', ip: '10.20.86.78', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.3', java.version: '1.8.0_101' Driver info: io.appium.java_client.android.AndroidDriver Capabilities [{appPackage=com.xxx.main, app=/Users/ankit.gupta04/Documents/Automation/xxx-ios-automation/TestSnapdealAutomation/app/xxx-universal-debug6.2.5.apk, networkConnectionEnabled=true, warnings={}, databaseEnabled=false, deviceName=fb04e45f, platform=LINUX, deviceUDID=fb04e45f, appActivity=com.xxx.ui.material.activity.MaterialMainActivity, desired={appPackage=com.xxx.main, app=/Users/ankit.gupta04/Documents/Automation/xxx-ios-automation/TestxxxAutomation/app/Snapdeal-universal-debug6.2.5.apk, appActivity=com.xxx.ui.material.activity.MaterialMainActivity, newCommandTimeout=60000, platformVersion=5.1.5, browserName=, platformName=Android, udid=fb04e45f, deviceName=MI}, newCommandTimeout=60000, platformVersion=5.0.2, webStorageEnabled=false, locationContextEnabled=false, takesScreenshot=true, browserName=, javascriptEnabled=true, platformName=Android, udid=fb04e45f}] Session ID: dc49fb82-611b-4a61-95dc-e1231815c1f5 *** Element info: {Using=xpath, value=//div[@class='address-section']//p[contains(text(),'blastandroid')]} at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678) at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42) at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1) at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1) at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:363) at org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:500) at io.appium.java_client.DefaultGenericMobileDriver.findElementByXPath(DefaultGenericMobileDriver.java:132) at io.appium.java_client.AppiumDriver.findElementByXPath(AppiumDriver.java:1) at io.appium.java_client.android.AndroidDriver.findElementByXPath(AndroidDriver.java:1) at org.openqa.selenium.By$ByXPath.findElement(By.java:361) at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:355) at io.appium.java_client.DefaultGenericMobileDriver.findElement(DefaultGenericMobileDriver.java:52) at io.appium.java_client.AppiumDriver.findElement(AppiumDriver.java:1) at io.appium.java_client.android.AndroidDriver.findElement(AndroidDriver.java:1) at mobileAutomation.androidApp.pages.ShippingPage.verifyPrimaryAddress(ShippingPage.java:328) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at mobileAutomation.master.Page.pageExecutor(Page.java:92) at mobileAutomation.testCases.Buy_Flow.BuyFlow_Android_LLD.verifyAddress(BuyFlow_Android_LLD.java:676) at mobileAutomation.testCases.Buy_Flow.BuyFlow_Android_LLD.buy_AutoSuggestor_Guest_COD(BuyFlow_Android_LLD.java:145) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at mobileAutomation.testCases.Buy_Flow.BuyFlow_Android_LLD.script(BuyFlow_Android_LLD.java:103) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at mobileAutomation.master.TestCase.testCaseExecutor(TestCase.java:2680) at mobileAutomation.testSuites.BuyFlowSuit.flow(BuyFlowSuit.java:222) at mobileAutomation.testSuites.BuyFlowSuit.run(BuyFlowSuit.java:182)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Unknown visitor
Unknown visitorOnce,
PilleoPilleo
6 times, last one
pnaranjapnaranja
Once,
raytestraytest
4 times, last one
Unknown visitor
Unknown visitorOnce,
8 more bugmates