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 !
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.
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!
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..
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.
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.
@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 ..
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
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 ?
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.
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.
Hi naveen....I excuted the codesame as you but it giving error.....MalformedURLException:Cannot invoke "String.length()" because "spec" is null.......Plz provide solution
hii Sir, I am getting the SSLHandshakeException: PKIX path building failed error continuously (it works in some site and some sites getting this error)
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].
@@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
@@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!
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.
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)
Hi Naveen, I am getting below exception. Any Suggestion?? "javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed"
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.
can anyone help me ..am getting below error. how to resolve it ? Exception in thread "main" java.net.MalformedURLException: unknown protocol: javascript
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 !
Thanks Naveen. This was an outstanding concept clearance video for broken links!!!👏👏👏
Glad you liked it
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.
Thanks a lot Naveen for explaining this tricky but important topic in a very easy way. I really appreciated your efforts. Thanks Naveen.
thats a awesome work Mr Naveen
amazon have 653 links out of which 493 links are active.
Thank you so much Naveen ji, you show me a good path to learn selenium
Very nice , very useful information, thanks a lot Naveen
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!
RIGHT ....
The content is very compact. Thanks Naveen.
+Pritha Dutta thanks pritha
Thanx Naveen for explained in details.
Very good and to the point explanation!! Thanks . Keep up the good work!
Thanks Anshita!!
Ur videos are very impressive!! Thanks a lot
Amazing explanation. thanks for the video
BrokenLinkTest code is not available in Github
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..
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.
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.
Good explanation ❤️❤️❤️🔥🔥🔥🔥,
But it would be very complex, if we have multiple pages to test
excellent tutorial. Thanks
Hi naveen....I excuted the codesame as you but it giving error....Cannot invoke "String.length()" because "spec" is null.......Plz provide solution
I am also facing same error , did you find any resolution ? Can you plz assist
Nice Explanation, Thanks Naveen
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?.
Hey Naveen your explanation is awesome.please tell me answer what will be answer of question currently which method are you using?
I m not getting status message as like ok or error like 40, only links it is printing. Kindly help.
Absolutely you are amazing & very easy to understand, thanks a lot Naveen :)
@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 ..
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.
Hi Naveen,
I am not find this code at your 'SeleniumJavaCourse' repo. Can you pls upload?
But Img tag doesn't have href
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
Very easily explained
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 ?
Broken links & Images code is not available in the given git repository. Can anyone help me on this?
Great explanation
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.
Yes.. Naveen can u please explain as I'm also getting same error
I m also getting the same error. Please Naveen help us out from this.
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.
Thank you Naveen
Hi naveen....I excuted the codesame as you but it giving error.....MalformedURLException:Cannot invoke "String.length()" because "spec" is null.......Plz provide solution
Hey where do you find this code, I am not able to see this code in github
Please upload vidoes for automation testing using selenium with C#
hii Sir, I am getting the SSLHandshakeException: PKIX path building failed error continuously (it works in some site and some sites getting this error)
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].
Hi Naveen,
Please put the BrokenLinksTest class code in GIT repository, unable to find that code in repository..
Hi Mr. Naveen, Where is the website you always showing? freecrm.com? I am not getting that as you have shown.... :)
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
How to do it recursively. One link has 10 other links inside it.
are the links separated using any delimiters?
@@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
@@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!
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.
I am also getting the same exception
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)
Has that error got resolved
Hi Naveen, I am getting below exception. Any Suggestion??
"javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed"
Can u please tell me how did u resolved the issue
Thanks a lot naveen ..
right now there total 366 links out of which 346 are active.
Gr8 explanation, thanks
how to select second link from list of links without using linktext and partiallinktext in selenium
Program get struck saying - java.net.MalformedURLException: no protocol: , Any solution??
@Naveen: Please help it is very necessary for me...
Hi Naveen, code is able to find in git.. could you upload?
Hi
Am getting Stale element reference exception
Can anybody please help me out?
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.
Hi Naveen, can you please make Similar video using Python language.Thanks
i m getting unauthorized , how to fix this
Thank you Naveen..
can anyone help me ..am getting below error. how to resolve it ?
Exception in thread "main" java.net.MalformedURLException: unknown protocol: javascript
I am also getting same exception. Anybody can help?
Hi naveen.. Can you please explain how to click on all elements present in website????
Please reply to this.
bro this works, but it struck at some point saying - java.net.MalformedURLException: no protocol: , Any suggestions??
i am also getting same exception.
naveen there is no such code in ur hit hub .. pls add it bro
Thanks a lot for Awesome videos! I am getting malformed URL exception.Code is not working after getting list of active links.Please help.
am not able to find code
how to avoid empty urls
am unable to find the code..please upload
the most complex topic till yet i found....Little bit cofused sir
Nice
thank u sir
Getting java.net.SocketTimeoutException
I will get job, I will donate something
am unable to find the code please upload