How To Handle No Such Element Exception - Selenium WebDriver Tutorial

Поделиться
HTML-код
  • Опубликовано: 27 авг 2024

Комментарии • 91

  • @saravanansaravanan18
    @saravanansaravanan18 2 года назад +1

    You are best in fixing issues

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  2 года назад +2

      Glad you found it helpful, please like and share the video to spread the word :)

  • @satylearn3383
    @satylearn3383 2 года назад +1

    Excellent solution. Thank you

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  2 года назад +1

      Glad you found it helpful :)
      Please like and share the video to spread the word and help us.

  • @shmidt_rc2338
    @shmidt_rc2338 2 года назад +1

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

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  2 года назад +1

      Glad you found it helpful :)
      Please like and share the video and help us spread the word.

  • @karthikeyanb6897
    @karthikeyanb6897 2 года назад +1

    very clear Explanation..!

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  2 года назад +1

      Glad you found it helpful :)
      Please like and share the video and help us spread the word.

  • @venkateshchowdary4331
    @venkateshchowdary4331 2 года назад +1

    your voice modulation and explanation is good sir...

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  2 года назад +1

      Glad you found it helpful :)
      Please like and share the video to spread the word and help us.

  • @anasibrahim6548
    @anasibrahim6548 2 года назад +1

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

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  2 года назад +1

      Glad you found it helpful :)
      Please like and share the video to spread the word and help us.

  • @AliAkbar-pm4ry
    @AliAkbar-pm4ry 2 года назад +1

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

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  2 года назад +1

      Glad you found it helpful :)
      Please like and share the video to spread the word and help us.

  • @abhishekpal3809
    @abhishekpal3809 2 года назад +1

    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 ''

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  2 года назад +2

      Hahaha, thanks bhai for such a beautiful comment. Glad you found it helpful :)
      Please like and share the video and help us spread the word.

  • @andukurirahulratan2256
    @andukurirahulratan2256 3 года назад +1

    Worked for me thxs a lot

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  3 года назад +1

      Glad you found it helpful :)
      Please like and share the video to spread the word and help us.
      If you like our content, you can enroll in the complete course also here:
      courses.letskodeit.com/courses/selenium-webdriver-with-java?coupon=RUclipsRS899

  • @divyabharathi2128
    @divyabharathi2128 6 лет назад +2

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

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  6 лет назад +1

      Glad you liked it :) Please feel free to share this video with your friends. It really helps us to bring more videos like this.

  • @JhonniMartins
    @JhonniMartins 3 года назад +1

    Thank you, helped a lot about the iFrame

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  3 года назад

      Glad you found it helpful :)
      Please like and share the video to spread the word and help us.
      If you like our content, you can enroll in the complete course also here:
      courses.letskodeit.com/courses/selenium-webdriver-with-java?coupon=RUclipsRS899

  • @alamar11
    @alamar11 3 года назад +1

    Thank you SO much

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  3 года назад +1

      Glad you liked it :)
      Please feel free to share this video with your friends. It really helps us to bring more videos like this.

  • @AjayKumar-ky8vo
    @AjayKumar-ky8vo 2 года назад +1

    Thank you my problem got solved 🙌

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  2 года назад +1

      Glad it helped you :)
      Please help spread the word by liking and sharing the video.

  • @thennarasuthen9179
    @thennarasuthen9179 2 года назад +1

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

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  2 года назад +2

      Glad you found it helpful :)
      Please like and share the video to spread the word and help us.

  • @narasimha4962
    @narasimha4962 6 лет назад +1

    Super Explanation,Thank you

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  4 года назад

      Glad you found it helpful :)
      Please like and share the video and help us spread the word.

  • @sowmyadevamanohar9192
    @sowmyadevamanohar9192 4 года назад +2

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

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  4 года назад +1

      It is not feasible to figure out the issue without seeing your code and environment.
      If you like our content, you can enroll in the complete course also here, and we can help you with the issues you are seeing:
      courses.letskodeit.com/courses/selenium-webdriver-with-java?coupon=RUclipsRS899

    • @kylosimon373
      @kylosimon373 3 года назад

      you probably dont give a shit but if you guys are stoned like me during the covid times you can watch pretty much all of the latest series on instaflixxer. Been streaming with my girlfriend lately :)

    • @codykyle7563
      @codykyle7563 3 года назад

      @Kylo Simon Definitely, have been using InstaFlixxer for since december myself :D

  • @lovesnhugs
    @lovesnhugs 2 года назад +1

    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 ... No unique name, id or tag.

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  2 года назад +1

      If you can provide an example website/element, I can definitely help you find the element.

  • @coryho9124
    @coryho9124 2 года назад +1

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

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  2 года назад +1

      If doesn't have id or name, we can find the with the help of index also.

  • @muhammadnabeel1375
    @muhammadnabeel1375 5 лет назад +3

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

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  5 лет назад +1

      There could be other issues as explained in the video. Timing issues is only one of the reason. In timing issue also, it may be possible that you can get the exception. At that time, you will have to use Explicit Wait

  • @shanvazshaik9654
    @shanvazshaik9654 2 года назад +1

    thanks a lot 😃

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  2 года назад +1

      Glad you found it helpful :)
      Please like and share the video to spread the word and help us.

  • @xushengchin511
    @xushengchin511 Год назад +1

    thank you so mcuh

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  Год назад +2

      Glad you liked it :)
      Please feel free to share this video with your friends.

  • @nishakanchan7682
    @nishakanchan7682 4 года назад +1

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

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  4 года назад +1

      What code you are using?
      Better try with XPath.

    • @nishakanchan7682
      @nishakanchan7682 4 года назад +1

      @@LetsKodeItOfficial thank you. I got the issue.. I used sign in to build xpath and that was not right. It was fixed after I used javascript:; to build xpath.
      Thank you for ur quick response.
      Your videos r very nice, informative and precise!

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  4 года назад +2

      @@nishakanchan7682 Glad you liked the videos. If you like, you can enroll in our complete course. You will have lifetime access and you will get all the test automation courses in one bundle:
      courses.letskodeit.com/courses/test-automation-bundle?coupon=RUclipsRS29

  • @user-yr3ks9hp1n
    @user-yr3ks9hp1n 2 года назад +1

    Liked and subscribed!

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  2 года назад +1

      Glad you found it helpful, please share the video to spread the word :)

  • @AC-vt1nq
    @AC-vt1nq 3 года назад +1

    Thanks , it was very informative.

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  3 года назад +1

      Glad you found it helpful :)
      Please like and share the video to spread the word and help us.
      If you like our content, you can enroll in the complete course also here:
      learn.letskodeit.com/p/selenium-webdriver-with-java/?product_id=342636&coupon_code=RUclipsSELJAVA9

    • @vishveshkhandpur2560
      @vishveshkhandpur2560 3 года назад +1

      @@LetsKodeItOfficial Hello can you please help, I am trying to interact with the buy now button on the amazon page. But, I am getting the error: str object is not callable. I have written the below lines of code.
      context=driver.find_element(By.XPATH("//button[contains(@class,'_2KpZ6l _2U9uOA _3v1-ww')]"))
      context.click()
      Will be very glad if you can please help me out. Thanks!

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  3 года назад +2

      @@vishveshkhandpur2560 Please send your complete code at letskodeit@gmail.com and will be happy to help.

    • @vishveshkhandpur2560
      @vishveshkhandpur2560 3 года назад +1

      @@LetsKodeItOfficial Thanks a lot, for the response I have mailed it!

  • @alanlevy1986
    @alanlevy1986 2 года назад +1

    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.

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  2 года назад +1

      The concept doesn't change with programming language. It will still be same reasons. You can send me the code at letskodeit@gmail.com and I can take a look. Please convert your code to Java or Python. I don't work with C Sharp.

  • @Letsnavigatetheunknown
    @Letsnavigatetheunknown 4 года назад +1

    Thanks man its worked

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  4 года назад +2

      Glad it helped you :)
      Please help spread the word by liking and sharing the video.

    • @Letsnavigatetheunknown
      @Letsnavigatetheunknown 4 года назад +1

      @@LetsKodeItOfficial please upload complete selenium course because your teaching style is awesome.

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  4 года назад +1

      @@Letsnavigatetheunknown It's available here. Please enroll if you like:
      courses.letskodeit.com/courses/selenium-webdriver-with-java?coupon=RUclipsRS899

  • @dikanurhasanah3218
    @dikanurhasanah3218 5 лет назад +1

    thank you, this is really helpfull!

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  5 лет назад

      Glad you found it helpful :)
      Please like and share the video to spread the word and help us.
      If you like our content, you can enroll in the complete course also here:
      learn.letskodeit.com/p/selenium-webdriver-with-java/?product_id=342636&coupon_code=RUclipsSELJAVA9

  • @alexroy9486
    @alexroy9486 4 года назад +1

    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.

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  4 года назад +2

      You should try Explicit Wait and expected condition wait for element to become clickable.

  • @ramphalke5775
    @ramphalke5775 5 лет назад +1

    org.openqa.selenium.ElementNotVisibleException: element not interactable
    I am still getting error :(

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  5 лет назад

      ElementNotInteractable is a different kind of exception, it is not as same as NoSuchElementException.
      ElementNotVisible is also a different kind of exception.
      ElementNotInteractable is similar to this kind of exception, but may not be same in every scenario:
      ruclips.net/video/iaI1vcEAWlM/видео.html

  • @numaellimasrodriguez6629
    @numaellimasrodriguez6629 2 года назад

    thank you so much

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  2 года назад

      Glad you found it helpful :)
      Please like and share the video and help us spread the word.

  • @yoriedwardville1727
    @yoriedwardville1727 4 года назад

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

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  4 года назад

      This is not a good way because of the uncertainty of the time an element can take to show up.

  • @alexroy9486
    @alexroy9486 4 года назад +1

    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 :)

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  4 года назад +1

      Implicit Wait does not work for all the scenarios, it does work for few scenarios though.

  • @poojad6164
    @poojad6164 2 года назад +1

    Thanks for such a informative video.

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  2 года назад +1

      Glad you found it helpful :)
      Please like and share the video to spread the word and help us.

  • @samruddhashirude8348
    @samruddhashirude8348 5 лет назад +1

    NoSuchElement found and notvisibile exception are sane?

    • @samruddhashirude8348
      @samruddhashirude8348 5 лет назад

      NoSuchElement found and not visible exception are Same?

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  5 лет назад

      They are not same. If element is present but it is not visible on the screen then ElementNotVisible Exception show up

  • @bojanjovic1404
    @bojanjovic1404 6 лет назад +1

    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:
    groups.google.com/forum/#!topic/letskodeselenium/YsHFJXPkUD0

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  4 года назад +1

      Please ask problems related to the video here.
      For other topics, please post a question on google group and will reply there.

  • @prakashs636
    @prakashs636 4 года назад +1

    spr ji :)

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  4 года назад +1

      Glad you found it helpful :)
      Please like and share the video and help us spread the word.

  • @ArunKumar-zd4ue
    @ArunKumar-zd4ue 4 года назад +1

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

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  4 года назад +2

      You should not use that :)
      Please start using Implicit Wait and Explicit Wait.

    • @ArunKumar-zd4ue
      @ArunKumar-zd4ue 4 года назад +1

      @@LetsKodeItOfficial OK I will do that

  • @user-yr3ks9hp1n
    @user-yr3ks9hp1n 2 года назад +1

    Liked and subscribed!

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  2 года назад +1

      Glad you found it helpful, please share the video to spread the word :)

  • @user-yr3ks9hp1n
    @user-yr3ks9hp1n 2 года назад +1

    Liked and subscribed!

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  2 года назад +1

      Glad you found it helpful, please share the video to spread the word :)