How To Handle No Such Element Exception - Selenium WebDriver Tutorial

preview_player
Показать описание
Selenium WebDriver No Such Element Exception is a frequent facing exception. You will definitely find this kind of exception while automating a web application. In this video we will see the reasons for this exception and how we can resolve it.

******** Explore Indian Lifestyle in America ********

******** Follow my non-work life ********

****************************************************************
Complete Test Automation Bundle ($29.99 Only):
Includes 9 Courses, future new test and automation courses will be added to this bundle

****************************************************************
Selenium WebDriver With Java ($8.99 Only):

****************************************************************
Selenium WebDriver With Python ($8.99 Only):

****************************************************************
Selenium WebDriver Bundle ($19 Only):

****************************************************************
Please be our Patron and support us to provide you great content:

Website:

Join Private Facebook Group:

Follow us on Facebook and Twitter for technology updates:
Рекомендации по теме
Комментарии
Автор

Superb... Thank you so much.. clear explanations. Understood very well..

divyabharathi
Автор

i was working on a bot for my company and this tutorial savedddd meeee
Thank sir

anasibrahim
Автор

thank you!!! I lost 4 hours to find out the problem and the only you helped me!)
my solution was switchTo()frame

shmidt_rc
Автор

your voice modulation and explanation is good sir...

venkateshchowdary
Автор

Thanks Bhai for this video, 4 hours se laga hua tha smj nahi aa rha tha element kyo nahi mil rha, then I got the answer - my element was in 'iframe'

abhishekpal
Автор

Thanks God Finally i got my solution after 4 days of searching ! Thank you!

AliAkbar-pmry
Автор

very helpful.. saved my day...thank you

thennarasuthen
Автор

Thank you, helped a lot about the iFrame

JhonniMartins
Автор

thanks for the video!
can you show how to handle a "no such element: Unable to locate element" solution in C#. i have a product page that i need to crawl. but some elements are with empty text and on other products are with value. but when i get to a one without text i get an Exception and the its not continuing to locate the other elements.

alanlevy
Автор

Can you show an example where there is a parent, then a li below the parent, then another sublevel below that that is the 7th of type (7the child of the 2nd level). It is not in an iframe... No unique name, id or tag.

lovesnhugs
Автор

Thanks! I have used explicit wait but even after that I'm getting a timeout exception

sowmyadevamanohar
Автор

What if the iframe has no id or name. I only could find the iframe src, but there was no name or id

coryho
Автор

hii..
when i use implicit wait line the issue stills occurs so what can i

muhammadnabeel
Автор

Personally my worst timing issue is when selenium thinks he clicked on an element when in reality he didin't. I think It's mainly because I'm telling selenium to click on some text with xpath when the text is present but the button functionality where the text belong to isint active yet skipping that line pretty much and trying to execute the next one. I had no found any solution for this one other than doing time.sleep(1) which I hate doing lol.

alexroy
Автор

Hi.. How do i locate an element (linked text). I get no such elementexception but my linked text is something like this: <a href="javascript:;">Sign in</a>
On trying to locate by linkedtext "Sign In" i get a Nosuchelementexception. Please help

nishakanchan
Автор

element not interactable


I am still getting error :(

ramphalke
Автор

Just do ‘import time’ on the top -> then > ‘time.sleep(3)’ wherever you want the program to pause and wait until elements load

yoriedwardville
Автор

Usually solved by 1 simple line |driver.implicitly_wait(30)| most no such element will be searched for 30 second before giving the exception, if it still does that this solution works well :)

alexroy
Автор

Hi,
I had a problem with Momondo website. I posted problem on your google group.
What I find out for this website is that there are multiple elements (more than one matching nodes) with the same XPATH.
So when I selected precisely one element (one matching node) than it didn't work, but when I leave xpath to find for example 2 elements (two matching nodes) and put it into the code than it worked.
I really don't know how this works and why it works on this way.
This totally confusing me.
Can you investigate and find out why it works just on this totally unexpected way and why does not work when you precisely specify XPATH?
Here is the link about problem in your google group:

bojanjovic
Автор

i was using sleep(3) so it wait 3 sec . yes i am a genius :)

ArunKumar-zdue