SELENIUM “SELENIUM.COMMON.EXCEPTIONS.NOSUCHELEMENTEXCEPTION” WHEN USING CHROME

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

SELENIUM “SELENIUM.COMMON.EXCEPTIONS.NOSUCHELEMENTEXCEPTION” WHEN USING CHROME

sajeev.crayons
C:\Users\CRAYONS\PycharmProjects\sample1\venv\Scripts\python.exe C:/Users/CRAYONS/PycharmProjects/sample1/seleniumscripts/secondseleniumscripts.py
Traceback (most recent call last):
  File "C:/Users/CRAYONS/PycharmProjects/sample1/seleniumscripts/secondseleniumscripts.py", line 17, in <module>
    username = driver.find_element_by_xpath("login[email]")
  File "C:\Python36-32\selenium\webdriver\remote\webdriver.py", line 387, in find_element_by_xpath
    return self.find_element(by=By.XPATH, value=xpath)
  File "C:\Python36-32\selenium\webdriver\remote\webdriver.py", line 957, in find_element
    'value': value})['value']
  File "C:\Python36-32\selenium\webdriver\remote\webdriver.py", line 314, in execute
    self.error_handler.check_response(response)
  File "C:\Python36-32\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"login[email]"}
  (Session info: chrome=67.0.3396.87)
  (Driver info: chromedriver=2.32.498550 (9dec58e66c31bcc53a9ce3c7226f0c1c5810906a),platform=Windows NT 6.1.7601 SP1 x86_64)


Process finished with exit code 1


i have a error so plz help me

--
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/b7c9b139-8832-4702-88ad-538dc3c647a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SELENIUM “SELENIUM.COMMON.EXCEPTIONS.NOSUCHELEMENTEXCEPTION” WHEN USING CHROME

ankit garg-2
Looks like xpath used is not correct

On Tue 19 Jun, 2018, 15:56 , <[hidden email]> wrote:
C:\Users\CRAYONS\PycharmProjects\sample1\venv\Scripts\python.exe C:/Users/CRAYONS/PycharmProjects/sample1/seleniumscripts/secondseleniumscripts.py
Traceback (most recent call last):
  File "C:/Users/CRAYONS/PycharmProjects/sample1/seleniumscripts/secondseleniumscripts.py", line 17, in <module>
    username = driver.find_element_by_xpath("login[email]")
  File "C:\Python36-32\selenium\webdriver\remote\webdriver.py", line 387, in find_element_by_xpath
    return self.find_element(by=By.XPATH, value=xpath)
  File "C:\Python36-32\selenium\webdriver\remote\webdriver.py", line 957, in find_element
    'value': value})['value']
  File "C:\Python36-32\selenium\webdriver\remote\webdriver.py", line 314, in execute
    self.error_handler.check_response(response)
  File "C:\Python36-32\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"login[email]"}
  (Session info: chrome=67.0.3396.87)
  (Driver info: chromedriver=2.32.498550 (9dec58e66c31bcc53a9ce3c7226f0c1c5810906a),platform=Windows NT 6.1.7601 SP1 x86_64)


Process finished with exit code 1


i have a error so plz help me

--
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/b7c9b139-8832-4702-88ad-538dc3c647a5%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/CAKOTObMB%2BCph%3DCyTgs%3DuAkSvf_dEajQBavAyXmScGcBAz9Wf1g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SELENIUM “SELENIUM.COMMON.EXCEPTIONS.NOSUCHELEMENTEXCEPTION” WHEN USING CHROME

total QA
Hi,

NoSuchElementException occurs due to following reason.

1. Element properties are dynamic
2. Due to timeout issue
3. Element is in the frame/Iframe.

Regards,
total-qa.com

On Tuesday, June 19, 2018 at 4:30:15 PM UTC+5:30, ankit garg wrote:
Looks like xpath used is not correct

On Tue 19 Jun, 2018, 15:56 , <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="BaUwYTtZBgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">sajeev....@...> wrote:
C:\Users\CRAYONS\PycharmProjects\sample1\venv\Scripts\python.exe C:/Users/CRAYONS/PycharmProjects/sample1/seleniumscripts/secondseleniumscripts.py
Traceback (most recent call last):
  File "C:/Users/CRAYONS/PycharmProjects/sample1/seleniumscripts/secondseleniumscripts.py", line 17, in <module>
    username = driver.find_element_by_xpath("login[email]")
  File "C:\Python36-32\selenium\webdriver\remote\webdriver.py", line 387, in find_element_by_xpath
    return self.find_element(by=By.XPATH, value=xpath)
  File "C:\Python36-32\selenium\webdriver\remote\webdriver.py", line 957, in find_element
    'value': value})['value']
  File "C:\Python36-32\selenium\webdriver\remote\webdriver.py", line 314, in execute
    self.error_handler.check_response(response)
  File "C:\Python36-32\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"login[email]"}
  (Session info: chrome=67.0.3396.87)
  (Driver info: chromedriver=2.32.498550 (9dec58e66c31bcc53a9ce3c7226f0c1c5810906a),platform=Windows NT 6.1.7601 SP1 x86_64)


Process finished with exit code 1


i have a error so plz help me

--
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 <a href="javascript:" rel="nofollow" target="_blank" gdf-obfuscated-mailto="BaUwYTtZBgAJ" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">selenium-user...@googlegroups.com.
To post to this group, send email to <a href="javascript:" rel="nofollow" target="_blank" gdf-obfuscated-mailto="BaUwYTtZBgAJ" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">seleniu...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/selenium-users/b7c9b139-8832-4702-88ad-538dc3c647a5%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/b7c9b139-8832-4702-88ad-538dc3c647a5%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/b7c9b139-8832-4702-88ad-538dc3c647a5%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/selenium-users/b7c9b139-8832-4702-88ad-538dc3c647a5%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">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/c67596e5-acd5-40e8-b652-a43192e6cc09%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.