How to find broken links & Images using Selenium Webdriver

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ธ.ค. 2024

ความคิดเห็น • 104

  • @stasbob2440
    @stasbob2440 3 ปีที่แล้ว +1

    Thanks so much ! This made my day . I'm new to Java , now writing my final project after finishing a course . Working with TestNg though ..Gotta make up an assertion on the test page on this , no clue meanwhile how .. Tremendous stuff !

  • @mohmashooqdowlati7933
    @mohmashooqdowlati7933 ปีที่แล้ว +2

    Thanks Naveen. This was an outstanding concept clearance video for broken links!!!👏👏👏

  • @bindunagaraj123
    @bindunagaraj123 3 ปีที่แล้ว +1

    Very nicely explained, But I think here u showed only broken links, not broken images, as we just checked href is not null and didn't check for src. Got addicted to ur channel Naveen, learning many things from u. Thank you for sharing ur knowledge.

  • @omkarpotdar2763
    @omkarpotdar2763 2 ปีที่แล้ว

    Thanks a lot Naveen for explaining this tricky but important topic in a very easy way. I really appreciated your efforts. Thanks Naveen.

  • @sourovrahman1700
    @sourovrahman1700 4 ปีที่แล้ว +1

    thats a awesome work Mr Naveen

  • @tejastoley6714
    @tejastoley6714 5 ปีที่แล้ว +7

    amazon have 653 links out of which 493 links are active.

  • @harshakalluri03
    @harshakalluri03 3 ปีที่แล้ว

    Thank you so much Naveen ji, you show me a good path to learn selenium

  • @seshareddy7254
    @seshareddy7254 7 ปีที่แล้ว +1

    Very nice , very useful information, thanks a lot Naveen

  • @testinginsights-muktasharma
    @testinginsights-muktasharma 6 ปีที่แล้ว +2

    Can you please look into the GIT once? The code base for this particular concept "Broken links" is not available in your git. I tried to search but I could not find it. Please update it.Thank you!

  • @prithadutta4699
    @prithadutta4699 7 ปีที่แล้ว +2

    The content is very compact. Thanks Naveen.

  • @Vikram.G
    @Vikram.G 2 ปีที่แล้ว

    Thanx Naveen for explained in details.

  • @ABAutomationHub
    @ABAutomationHub 4 ปีที่แล้ว +1

    Very good and to the point explanation!! Thanks . Keep up the good work!

  • @ItsMeSimna
    @ItsMeSimna 6 ปีที่แล้ว +2

    Ur videos are very impressive!! Thanks a lot

  • @priyadharsini4569
    @priyadharsini4569 4 ปีที่แล้ว +1

    Amazing explanation. thanks for the video

  • @pandudamera7211
    @pandudamera7211 7 ปีที่แล้ว +2

    BrokenLinkTest code is not available in Github

  • @21suhana
    @21suhana 4 ปีที่แล้ว +2

    Hello Naveen, Thank you so much for doing excellent work..I've a requirement where I've to verify if all the links are working or if there is any broken links (404,500, etc)..I tried your code but unfortunately, it isn't working as it is supposed to.. I know few links have ISE(500) error and it still displays "Ok" message..Any lead to this would be highly appreciated..

  • @bipulhaldar2572
    @bipulhaldar2572 5 ปีที่แล้ว

    Well Naveen I did not understand how you got 'href' property of 'img' element? As far as my understanding goes, 'img' elements do not support the 'href' or hyper-reference. The 'img' supports the 'src' property which is a link to the location where the image is to be found.
    Also to check whether the link to the 'img' element is broken or not we have the check the 'src' property and check whether it is returning an image or not.

    • @KOTHAABHISHEK
      @KOTHAABHISHEK 4 ปีที่แล้ว

      Actually no need to search about img tag
      Because if we want to add a link we will use anchor tag only
      For image also we will use anchor tag only
      For example
      If we are getting a tag so automatically it will search this image link also.

  • @akonsantosh
    @akonsantosh 4 ปีที่แล้ว

    Good explanation ❤️❤️❤️🔥🔥🔥🔥,
    But it would be very complex, if we have multiple pages to test

  • @jdhung
    @jdhung 4 ปีที่แล้ว +2

    excellent tutorial. Thanks

  • @deepakdange5530
    @deepakdange5530 3 ปีที่แล้ว +1

    Hi naveen....I excuted the codesame as you but it giving error....Cannot invoke "String.length()" because "spec" is null.......Plz provide solution

    • @masterdisaster1730
      @masterdisaster1730 2 ปีที่แล้ว

      I am also facing same error , did you find any resolution ? Can you plz assist

  • @seshareddy7254
    @seshareddy7254 7 ปีที่แล้ว +1

    Nice Explanation, Thanks Naveen

  • @magheshsingaravelu2114
    @magheshsingaravelu2114 4 ปีที่แล้ว

    One small clarification for img tag we need to take src attribute and for anchor tag we need to take href attribute is that correct?.

  • @ajindia1085
    @ajindia1085 5 ปีที่แล้ว

    Hey Naveen your explanation is awesome.please tell me answer what will be answer of question currently which method are you using?

  • @GunjanBadjatya
    @GunjanBadjatya 5 ปีที่แล้ว

    I m not getting status message as like ok or error like 40, only links it is printing. Kindly help.

  • @jahangiralikhan2410
    @jahangiralikhan2410 6 ปีที่แล้ว

    Absolutely you are amazing & very easy to understand, thanks a lot Naveen :)

    • @arunamaurya8596
      @arunamaurya8596 4 ปีที่แล้ว

      @Shivanshu Sharma ArrayList is a class which implements List interface.This Arraylist is used to store list of elements of some type .So here we are finding list of webelement Array List .Since we are using findElements it returns multiple WebElements ..

  • @bindunagaraj123
    @bindunagaraj123 3 ปีที่แล้ว

    can i store all //a[@href] and //img[@src ] xpaths in a list and check if its not null get HttpURLConnection.. everything in 6 lines of code.

  • @mohammedsorowarjahan490
    @mohammedsorowarjahan490 7 ปีที่แล้ว +1

    Hi Naveen,
    I am not find this code at your 'SeleniumJavaCourse' repo. Can you pls upload?

  • @madhurinemade27
    @madhurinemade27 6 ปีที่แล้ว +2

    But Img tag doesn't have href

  • @shabnammustari4186
    @shabnammustari4186 2 ปีที่แล้ว

    Hi Naveen.Thanks a lot for all learning videos. Im new to Java. I was following all the steps under this playlist. But somehow my TestNG is not working properly. I downloaded idk 17.0.1 version, selenium 4.0.0, is that's the issue? I noticed Selenium 4.0.0 version command are little different that you showed. What should I do this case. Also want to know is there any difference way I should do code my TestNG on Selenium 4.0.0
    Please help me

  • @manaligupta1098
    @manaligupta1098 7 ปีที่แล้ว +1

    Very easily explained

  • @stasbob2440
    @stasbob2440 3 ปีที่แล้ว

    Hello Sir , there is one problem. It works but i need to do on a specific page . And it catches more url's than there is on that page by "a" tag name . Any thoughts what it might be related to ?

  • @nagabhushan5994
    @nagabhushan5994 3 ปีที่แล้ว

    Broken links & Images code is not available in the given git repository. Can anyone help me on this?

  • @anagamt1692
    @anagamt1692 3 ปีที่แล้ว

    Great explanation

  • @lakshaygarg4342
    @lakshaygarg4342 6 ปีที่แล้ว +1

    Hi Naveen, I am getting an error "Connection time out : connect" in line code connection.connect().
    Can you please help me to understand the reason of error.

    • @rockingrajashree1108
      @rockingrajashree1108 6 ปีที่แล้ว +1

      Yes.. Naveen can u please explain as I'm also getting same error

    • @rajeshkumarmahto3106
      @rajeshkumarmahto3106 6 ปีที่แล้ว

      I m also getting the same error. Please Naveen help us out from this.

  • @Anand31187
    @Anand31187 4 ปีที่แล้ว

    Hi Naveen,
    I am getting following exception while running the broken links code.
    Exception in thread "main" java.net.ProtocolException: Server redirected too many times (20)
    Can you help me to fixing this issue.

  • @sindhusudhakaran1731
    @sindhusudhakaran1731 4 ปีที่แล้ว +1

    Thank you Naveen

  • @soumyarautaray4517
    @soumyarautaray4517 5 หลายเดือนก่อน

    Hi naveen....I excuted the codesame as you but it giving error.....MalformedURLException:Cannot invoke "String.length()" because "spec" is null.......Plz provide solution

  • @Starthene
    @Starthene 4 ปีที่แล้ว

    Hey where do you find this code, I am not able to see this code in github

  • @swathijonnadula8585
    @swathijonnadula8585 5 ปีที่แล้ว +1

    Please upload vidoes for automation testing using selenium with C#

  • @surajmali4345
    @surajmali4345 2 ปีที่แล้ว

    hii Sir, I am getting the SSLHandshakeException: PKIX path building failed error continuously (it works in some site and some sites getting this error)

  • @loquesea187
    @loquesea187 6 ปีที่แล้ว

    Nice vid !!. One question, I am new to selenium but so far all the video tutorials Ive seen, always use a loop to get certain elements, why is that? it is better performance wise?
    Asking that because you can get all the "a" and "img" that has a href attribute with one cssSelector: a[href],img[href].

  • @GauravSharma-bw4gu
    @GauravSharma-bw4gu 5 ปีที่แล้ว

    Hi Naveen,
    Please put the BrokenLinksTest class code in GIT repository, unable to find that code in repository..

  • @ManeendraBH
    @ManeendraBH 5 ปีที่แล้ว

    Hi Mr. Naveen, Where is the website you always showing? freecrm.com? I am not getting that as you have shown.... :)

  • @ayanbarua4461
    @ayanbarua4461 3 ปีที่แล้ว

    Hello sir i am not able to find the code for broken links in the git repo, it will be great if it is available @naveen sir

  • @monil.joshi4
    @monil.joshi4 4 ปีที่แล้ว +1

    How to do it recursively. One link has 10 other links inside it.

    • @Nandhis
      @Nandhis 4 ปีที่แล้ว +1

      are the links separated using any delimiters?

    • @monil.joshi4
      @monil.joshi4 4 ปีที่แล้ว

      @@Nandhis
      I am talking about nested links.. like if you go through aws or Android documentation you can see there are multiple hyperlink on the same page.
      So if I sum it up I am redirecting to home page then it 100 links out of which I navigate to first one it has another 50 links again I take first one out of 50 and it has some 20 links
      So how can I traverse and validate these 20 links then 50 links and validate same for rest of 99 out of 100 links

    • @Nandhis
      @Nandhis 4 ปีที่แล้ว

      @@monil.joshi4 i got your point. Selenium will access only current page's web elements. It can't access recursively from other links like how you have mentioned.
      If you would like to do so, you need to open each link in new window/tab and then verify. That is going to be very tough for you.
      Instead, if you have access to your application's all APIs and if you could get all the links, that will be easier for you.
      Thanks!

  • @ankitasomani2178
    @ankitasomani2178 6 ปีที่แล้ว +1

    Hi Naveen..I am getting Exception while running program Exception in thread "main" java.net.UnknownHostException: www.freecrm.com and not able to find solution for this. Can someone please help.

  • @kidscare4562
    @kidscare4562 5 ปีที่แล้ว +1

    Hi Naveen thank you so much for this Section, am getting java.net.MalformedURLExecption: no protocal:
    (But that url formate is correct starting with )
    Can you pls help me and one more am getting empty space while printing url ( first five url came one by one after that two lines space then 6 the url printing getting error at 6 the url)

  • @sumirozario904
    @sumirozario904 6 ปีที่แล้ว

    Hi Naveen, I am getting below exception. Any Suggestion??
    "javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed"

    • @deepakwagh6722
      @deepakwagh6722 2 ปีที่แล้ว

      Can u please tell me how did u resolved the issue

  • @NidhiSharma-ir4ki
    @NidhiSharma-ir4ki 5 ปีที่แล้ว

    Thanks a lot naveen ..

  • @tejastoley6714
    @tejastoley6714 6 ปีที่แล้ว +1

    right now there total 366 links out of which 346 are active.

  • @myfrowards
    @myfrowards 6 ปีที่แล้ว

    Gr8 explanation, thanks

  • @umasalve8012
    @umasalve8012 2 ปีที่แล้ว

    how to select second link from list of links without using linktext and partiallinktext in selenium

  • @sumitkumar9746
    @sumitkumar9746 5 ปีที่แล้ว

    Program get struck saying - java.net.MalformedURLException: no protocol: , Any solution??

    • @sumitkumar9746
      @sumitkumar9746 5 ปีที่แล้ว

      @Naveen: Please help it is very necessary for me...

  • @kumarwodeyar8884
    @kumarwodeyar8884 4 ปีที่แล้ว

    Hi Naveen, code is able to find in git.. could you upload?

  • @arpitasmruti8247
    @arpitasmruti8247 5 ปีที่แล้ว +1

    Hi
    Am getting Stale element reference exception
    Can anybody please help me out?

    • @sanjayym4503
      @sanjayym4503 5 ปีที่แล้ว +1

      Stale (State is nothing but something not fresh) element reference exception occurs because of AJAX components / some time those components / elements get refreshed within the page that in turn generates new id . Here, Id is not normal id which you use for finding web elements. Just surround the code with try-catch block and re-identify the same element / object in the catch block then perform the action.

  • @vpkori
    @vpkori 4 ปีที่แล้ว

    Hi Naveen, can you please make Similar video using Python language.Thanks

  • @rajsinghal05
    @rajsinghal05 5 ปีที่แล้ว

    i m getting unauthorized , how to fix this

  • @praneethchakri7052
    @praneethchakri7052 7 ปีที่แล้ว

    Thank you Naveen..

  • @maheshtenapali8938
    @maheshtenapali8938 5 ปีที่แล้ว

    can anyone help me ..am getting below error. how to resolve it ?
    Exception in thread "main" java.net.MalformedURLException: unknown protocol: javascript

    • @AjayKumar-ye2cu
      @AjayKumar-ye2cu 5 ปีที่แล้ว

      I am also getting same exception. Anybody can help?

  • @rockingrajashree1108
    @rockingrajashree1108 6 ปีที่แล้ว

    Hi naveen.. Can you please explain how to click on all elements present in website????

    • @balabala6136
      @balabala6136 5 ปีที่แล้ว

      Please reply to this.

  • @karthikdeepan1998
    @karthikdeepan1998 6 ปีที่แล้ว

    bro this works, but it struck at some point saying - java.net.MalformedURLException: no protocol: , Any suggestions??

    • @AjayKumar-ye2cu
      @AjayKumar-ye2cu 5 ปีที่แล้ว

      i am also getting same exception.

  • @Srhnu449
    @Srhnu449 5 ปีที่แล้ว

    naveen there is no such code in ur hit hub .. pls add it bro

  • @alka240280
    @alka240280 5 ปีที่แล้ว

    Thanks a lot for Awesome videos! I am getting malformed URL exception.Code is not working after getting list of active links.Please help.

  • @rekhaacharya1108
    @rekhaacharya1108 7 ปีที่แล้ว

    am not able to find code

  • @rekhaacharya1108
    @rekhaacharya1108 6 ปีที่แล้ว

    how to avoid empty urls

  • @honeym6899
    @honeym6899 7 ปีที่แล้ว

    am unable to find the code..please upload

  • @ravikumar-lk5we
    @ravikumar-lk5we 7 ปีที่แล้ว

    the most complex topic till yet i found....Little bit cofused sir

  • @sandhyasanaka5200
    @sandhyasanaka5200 6 ปีที่แล้ว

    Nice

  • @kollabathulasowjanya1610
    @kollabathulasowjanya1610 6 ปีที่แล้ว

    thank u sir

  • @vasantvarma6406
    @vasantvarma6406 5 ปีที่แล้ว

    Getting java.net.SocketTimeoutException

  • @harshakalluri03
    @harshakalluri03 3 ปีที่แล้ว

    I will get job, I will donate something

  • @rekhaacharya1108
    @rekhaacharya1108 6 ปีที่แล้ว +1

    am unable to find the code please upload