Hi Mukesh, I really appreciate you for taking effort to educate us. I follow you channel and website on daily basis It will be really great if you can make videos for Keyword and Hybrid Frameworks with detailed project structure that are followed by companies. Thank you..
Hi Mukesh......Your videos are awesome and very helpful. Which are help me to increase my knowledge and help in teaching. Doing great job ...Thanks......
Hiii Mukesh This is Siva from USA your videos are just awesome ,very easy to understand for any one and really you are doing a great job ,anyone can learn easily from your videos without going to any institute.Please continue this and i would like to suggest you to keep some frequently asked questions in interviews with examples and also explain some real time scenarios Thank u you so much
+Siva rama krishna Ryali Hi Siva that is my next Step.. Keep visiting and thank a ton for nice feedback. Let me know if any help required from my side.
Mukesh really appreciated !! always like your upload videos, it's help me a lot to started my selenium project. the way you teach is the best to compared to other instructor.
dunno if you guys gives a damn but if you guys are bored like me during the covid times then you can watch pretty much all of the latest movies and series on Instaflixxer. Been binge watching with my brother for the last days :)
It’s nice , thanks a lot , I have one question, when I run the test , it includes so many same links , duplicated links . How can I remove it ? Please help .
I have the program which you discussed and it works. How To convert this into TestNg. I'm asking this basic question as I'm still at learning stage. Kindly guide me.
My question was you gave a small assignment in this video at 0.38 s of this ua-cam.com/video/OTtFSnZY4f8/v-deo.html video. This assignment was to convert the program written into TestNG framework by adding an assertion framework. 11.20 sec. was asking that only. How to convert this program into TestNG framework and add assertion
Hi Mukesh, How do I convert this code to run for TestNG? I basically want to fail the test case if there is a broken link. I assume this is what is required when you are given to test if all links on a page is working fine. Right?
Hi Mahendra you can use @Test to convert with TestNG ua-cam.com/video/OTtFSnZY4f8/v-deo.html Yes, I agree we need to put assert when we dont get 200 response code.
Hey mukesh! Are u discussing the assignment anywhere. i was trying one of them you gave in this video to have assert condition included in this and was a bit confused
Hi Sir , First of all you're great - i learned a lot from you . But i have to join the people who ask you about how to write an assert on this . Because we use TestNg and the Tests page must remain "clean" and i cannot write assertion in the method Thanks in advance Stas from Tel Aviv
Hi Mukesh - If we use String linkText=ele.getText(); and String linkText=ele.getAttribute("innerText") to find the link text -what will be difference in output
Hi Mukesh Thanks for this video!! I tried this code & and its working fine but when there is some urls having "null" or having "javascripts void", how can we skip that part?
Hey Mukesh, I am not sure in which video I needs to ask you. I have a scenario like, I am looping through and getting some element text and storing into an array. But in b/w if the page updating with the latest values, code is going to exception telling that the element not attached to DOM. So here what I want to do is, I don't want to get the page to be refreshed till the loop completes and I don't need latest values also. Please help me on this. Got struck here with it...
Hi Mukesh, in website if the links contains pdf files how to get the count of that only pdf files.Pleass share the code eg: selenium Wikipedia if u click on external links u vil get down with lists of pdf files associated with links
Hi Mukesh. My website has 156 links in total and this code shows total count of 141. what could be the reason? Also, when i check from console, it shows 120 links with their status but not total identified i.e. 141.
Hi Tasneem, Yes I got your point the reason why it is showing 141 is because some links are only JS (Java Script)link which does not have href attribute so above code will only check link with href attribute.
Hi Mukesh, I just copy paste code from the link you provided and getting following error:- Exception in thread "main" java.lang.Error: Unresolved compilation problem: at TestCases.VerifyBrokenLinks.main(VerifyBrokenLinks.java:13) What could be the possible reason?
Hi Pravesh, Have you tried writing the code by yourself. If you still have issue then you have to debug your code and check. ua-cam.com/video/rXXeHfvbddo/v-deo.html
please provide video for broken images also. what is the difference between HttpClient and HttpURLConnection? in some sites, I saw that they are using HttpClient to test broken image
How to do it recursively 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 has 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
Hello Mukesh, Thank you for your effort..I tried your technique but I'm unable to get links that are broken (404 and 500 errors)..I see "ok" message for even broken links..Any help would be highly appreciated
Hey Mukesh, This is really a good one and thanks for sharing it. Really appreciate your efforts. Can you please let us know how to find out broken links for the entire site instead of a single webpage. For example: i want to broken links for entire website of learn-automation.com/.
No..actually some of the links having response code...301 (permanently moved)...as you have used condition (==200) that why i was missing few links..better to use (response code
Hello Sir, I have applied the broken link script to my application but & it showed me the expected result but the question comes how can i identify in the UI where the Link is not working or giving Wrong, what is the way that I can explain to the developer that this is the particular space where you have given the wrong links
Hi Mukesh, I tried the code provided by you. For the first time, it ran successfully. But after that, I am keep on getting "connect timed out". Could you please help me with this.
Hi Sir, Line number 50.. HttpsUrlConnection one.... Please help me to understand that. HttpUrlConnection is not an Interface.. it is a class . It looks like we are typecasting URL to HttpUrlConnection. Please explain sir. Thank you in advance.
Hi Mukesh , the code work fine, but i got this error when it was verifying the links: java.net.MalformedURLException: unknown protocol: javascript for 2 urls, can we deal with these or ignore it?
Its working as per expections for single URL. But when i redirect website using selenium webdriver code it is giving "org.openqa.selenium.StaleElementReferenceException: stale element reference: element is not attached to the page document" Can we write the code for this?
hi mukesh. i got this below error when i click a button how to fix it???? org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (1130, 27). Other element would receive the click: . if u have time pls give some solution for me..
Hi Mukesh, I tried to implement assertion for the script as said in the assignment. I am getting error in a mid quoting translate.google.com/?hl=en&tab=wT - forbidden - 404 expected [200] found [403]. I tried to open the link having this msg. It was of Google translate. It opened and worked fine. Also when I run the script you have provided without assertion that script is working fine. Can u please help with this assignment.
Hi Rehan, I would recommend you to use API for checking broken links. If you still want to check in such manner then follow below approach. Click on Link It will open another tab or window. Switch to new window verify title should not be blank or url or page source should not contain 404 error.
I did try from my end, plz let me know if there is any other way, right click on page, view source page> , in source page by finding link, got (Attribute, tagname with value). then thru firepath, i wrote dynamic xpath, //a[@class='accessible_elem'] then found its hidden element. plz let me know if there is any other way to find link????
+Zain Khokhar Hi Zain I have another way 1- get all a tag and get href attribute and pass url in get method and check if any page title contains page not found the mark as broken. if you are thinking that this will take high execution time then please let headless browser in this case. Below video will help you for headless ua-cam.com/video/dEDtf8zJTKg/v-deo.html
Hi Mukesh, I used your same code. But it was not getting executed after the httpURLConnect.setConnectTimeout(3000);. It was stuck in this stmt. it was not moved to the next stmt i.e. httpURLConnect.connect();. Can you please guide me?.
Hi sir , I am using your code but sometimes i get null response and sometimes ok what does null signify even though the link is working why it is showing null Thank you in advance
Hey Mukesh, this is Upendra again. This post I am putting related to this video only. I tried to test with our applications. For some links I am getting response as "Moved Permanently" and "Moved Temporarily". I am getting this in else part of the below code. Can I know what does it means? if(httpURLconnect.getResponseCode()==200){ System.out.println(linkURL+" - "+httpURLconnect.getResponseMessage()); } else{ System.out.println(linkURL+" - "+httpURLconnect.getResponseMessage()); } And anything got on my other post. You will save my life if you find something for me.Please... Thanks, Upendra
+Upendra D Sorry Mukesh, I got the answer. Whichever links are redirecting to some other links then those are giving these response. I should have checked before posting this. Sorry man. But can you please find a way to my other comment in this video...
Mukesh,,, Really nice post as usual, and really like they way you teach. how we will know if some or one link is broken. For example in facebook signup page this link not found "facebook.com/allactivity?privacy_source=activity_log_top_menu - Not Found - 404" how we will find the link is belong to which element?
+Zain Khokhar Hi Zain in this case you have to check the title and verify the same because the above code wil check 404 only.. above facebook example is not for broken link
Yeah. The solution you have provided will work if src='someurl". But nowadays contents are like src="blob:someurl". Blob is nothing but generation of url at run time based of url memory address. All azure based data stored websites are constructed of this way. For example, inspect current page and try to take url of this video from video tag.
Hi Mukesh! Thanks for you created this channel! It's my "holy book" (or better say "holy channel" :) ) for so many everyday stuff in automation! Your script for http protocol works just perfect, but for https protocols I have 2 scenarios. №1scenario for link "websitename" I used if (httpURLConnect instanceof HttpsURLConnection) { HttpsURLConnection httpsURLConnect = (HttpsURLConnection) httpURLConnect; .......... and it works fine. №2 scenario for "www.websitename" the case is caught by a catch block. Any clue how to fix this? Thanks!
Hi Mukesh, In this line System.out.println(linkURL+"-"+httpURLConnect.getResponseMessage()+"-"+HttpURLConnection.HTTP_NOT_FOUND); Why are you printing +"-"+HttpURLConnection.HTTP_NOT_FOUND Can you please explain?
Hi Mukesh,
I really appreciate you for taking effort to educate us.
I follow you channel and website on daily basis
It will be really great if you can make videos for Keyword and Hybrid Frameworks with detailed project structure that are followed by companies.
Thank you..
+Robin Gajbhiye Hi Robin it is in queue will upload soon.
Hi Mukesh......Your videos are awesome and very helpful. Which are help me to increase my knowledge and help in teaching.
Doing great job ...Thanks......
+Pranali Kumbhare Thank you pranali let me know if any help from my side.
+Mukesh otwani Ofcourse
Hiii Mukesh This is Siva from USA your videos are just awesome ,very easy to understand for any one and really you are doing a great job ,anyone can learn easily from your videos without going to any institute.Please continue this and i would like to suggest you to keep some frequently asked questions in interviews with examples and also explain some real time scenarios
Thank u you so much
+Siva rama krishna Ryali Hi Siva that is my next Step.. Keep visiting and thank a ton for nice feedback. Let me know if any help required from my side.
Hi, Mukesh thank you so much for your Tutorials. Your tutorials helped me a lot to learn selenium
superb bro.....i get the concept very clearly seeing your videos
+prasanna kulkarni Thanks Prasanna
Really Nice , You made it simple and easy to understand , Thanks a Lot
+shafaat hussain Hi Shafft glad to know it helped you .
Mukesh really appreciated !! always like your upload videos, it's help me a lot to started my selenium project. the way you teach is the best to compared to other instructor.
dunno if you guys gives a damn but if you guys are bored like me during the covid times then you can watch pretty much all of the latest movies and series on Instaflixxer. Been binge watching with my brother for the last days :)
@Maxwell Onyx definitely, I've been using Instaflixxer for months myself =)
Always like Sir..great effort from your side for us....Thank you very much ...
🙏🙏🙏🙏 Thanks Neetu whenever u need any help don't hesitate to contact me
Thank you Mukesh for this!!!perfectly explained !!
Glad it was helpful! Abhishek
Hi Mukesh really nice viedo.
please post viedo reading How to handle broken images in selenium Webdriver.
+Nagudu Manikanta thanks yes I will upload soon
Thankq
Hi sir u r teaching is awesome..please upload. Video's on java programming
Total Life Saver!! Thank You!
Thank you mate, I am glad to know that my video has helped you.
It’s nice , thanks a lot , I have one question, when I run the test , it includes so many same links , duplicated links . How can I remove it ? Please help .
You can convert List into Set which will remove duplicate element or items.
This is so cool !!! super... always worth watching your videos.
thanks Fahim keep visiting happy weekend..
Hi, Mukesh really this broken links video is very helpful. Can you pl suggest how to write assert method for broken links in testNG.
Thank you for the awesome explanation!
Thank you Sharma ji .. Please do watch other videos too and let me know if you have any doubt.
I have the program which you discussed and it works. How To convert this into TestNg. I'm asking this basic question as I'm still at learning stage. Kindly guide me.
Hi Sachin,
Please follow below document/link for TestNG
ua-cam.com/video/OTtFSnZY4f8/v-deo.html
My question was you gave a small assignment in this video at 0.38 s of this ua-cam.com/video/OTtFSnZY4f8/v-deo.html video. This assignment was to convert the program written into TestNG framework by adding an assertion framework. 11.20 sec. was asking that only. How to convert this program into TestNG framework and add assertion
Hi Mukesh,
How do I convert this code to run for TestNG? I basically want to fail the test case if there is a broken link.
I assume this is what is required when you are given to test if all links on a page is working fine. Right?
Hi Mahendra you can use @Test to convert with TestNG ua-cam.com/video/OTtFSnZY4f8/v-deo.html
Yes, I agree we need to put assert when we dont get 200 response code.
Hi Mukesh...One query this count is the only for that particular page ya entire application link count?
You can use for single link as well.
Superb! Another exciting way to find Terror sorry Error, HTTP Response Code 404!! :)
+Nitin Gupta Thanks Nitin :)
Hello Mukesh, can you make a video/tutorial on broken image link, especially the verification method that you will pass the image argument to?
Hi Oludare you can use src attribute for images and follow the same video.
You are awesome Bro..
+piyush RAGHATATE Thanks Piyush :) keep visiting other videos as well and let me know if any help from myside.
Hey mukesh!
Are u discussing the assignment anywhere. i was trying one of them you gave in this video to have assert condition included in this and was a bit confused
Hey Sachin where is your confusion?
Hi thank you for this helpful tutorial, but what about if I want to test the whole website links? with multiple pages
Hi Jomari in that case we have to keep calling the method which we created for each and every page.
Hi Sir , First of all you're great - i learned a lot from you . But i have to join the people who ask you about how to write an assert on this . Because we use TestNg and the Tests page must remain "clean" and i cannot write assertion in the method
Thanks in advance
Stas from Tel Aviv
No prob mates, loved your honesty. I will try to this scenario too.
Thanks a lot !)
hello sir please upload some video for data driven framework from basics to advance...
Hi Mukesh - If we use String linkText=ele.getText(); and String linkText=ele.getAttribute("innerText") to find the link text -what will be difference in output
Hi Mukesh
Thanks for this video!!
I tried this code & and its working fine but when there is some urls having "null" or having "javascripts void", how can we skip that part?
Awesome video. thanks!
Thanks Suyash :)
Hi Mukesh.. Could you please do a session on Selenium in Sauce lab using Tunnel
Hey mukesh could you explain what is verifyLinkActive() is
I just created lib for reusing purpose
Hello!!!Can you please make a video demonstrating how to work with context clicks and other such right click options???
+Nexon Samuel Hi Nexon sure will make soon. You can visit my blog in meantime for the same.learn-automation.com/selenium-advance-activity/
+Mukesh otwani Thank You So much!!!!Eagerly waiting
Hi Mukesh. I'm trying to check if a certain image is present in a pdf. Could you recommend any API? Thanks
Hi Mani,
This will help you read pdf file content
org.apache.pdfbox
pdfbox
2.0.6
Thank you Mukesh. I used itext pdf and I was able to do the validation.
Thank You Mukesh!
Super explanation
Hey Mukesh, I am not sure in which video I needs to ask you. I have a scenario like, I am looping through and getting some element text and storing into an array. But in b/w if the page updating with the latest values, code is going to exception telling that the element not attached to DOM. So here what I want to do is, I don't want to get the page to be refreshed till the loop completes and I don't need latest values also. Please help me on this. Got struck here with it...
+Upendra D is it fixed?
Not fixed Mukesh. That would be great if u can give me a way...
+Mukesh otwani hi, Mukesh got any way for this please?
+Upendra D Hi Mukesh, Sorry to followup again and again. But got struct here. Can you please help me out there...
Hi Mukesh, in website if the links contains pdf files how to get the count of that only pdf files.Pleass share the code eg: selenium Wikipedia if u click on external links u vil get down with lists of pdf files associated with links
Hi Mukesh....
can u plz tell me how to handle captcha box using selenium webdriver....
Joshna Sravani you can't handle captcha using selenium web driver
Hi Mukesh.
My website has 156 links in total and this code shows total count of 141. what could be the reason?
Also, when i check from console, it shows 120 links with their status but not total identified i.e. 141.
Hi Tasneem,
Yes I got your point the reason why it is showing 141 is because some links are only JS (Java Script)link which does not have href attribute so above code will only check link with href attribute.
and what about showing 120 out of 140 in console?
Very Helpfull vidio sir
Hi Mukesh, what if we get SSLHandshakeException when we are doing httpURLConnect.connect();
How to handle this situation?
Hi Mukesh,
I just copy paste code from the link you provided and getting following error:-
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
at TestCases.VerifyBrokenLinks.main(VerifyBrokenLinks.java:13)
What could be the possible reason?
Hi Pravesh,
Have you tried writing the code by yourself.
If you still have issue then you have to debug your code and check.
ua-cam.com/video/rXXeHfvbddo/v-deo.html
nice mukesh
Thank you Ahmed 🙏
please provide video for broken images also. what is the difference between HttpClient and HttpURLConnection? in some sites, I saw that they are using HttpClient to test broken image
HTTPClient is the library to test API’s.
HTTPURLconnection is the class to connect to sever through http protocol
and how to test broken images?
Hello Mukesh,
how can we print the final result & count of the Active and Broken links ?
How to do it recursively
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 has 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
Thanks great video
Hello Mukesh, Thank you for your effort..I tried your technique but I'm unable to get links that are broken (404 and 500 errors)..I see "ok" message for even broken links..Any help would be highly appreciated
Hi Suhana, can you share your code? which application you have used?
@@Mukeshotwani public class VerifyLinks {
public static void main(String[] args)
{
WebDriver driver=new FirefoxDriver();
driver.manage().window().maximize();
driver.get("www.google.co.in/");
List links=driver.findElements(By.tagName("a"));
System.out.println("Total links are "+links.size());
for(int i=0;i
FYI I'm using company website
Hey Mukesh, This is really a good one and thanks for sharing it. Really appreciate your efforts. Can you please let us know how to find out broken links for the entire site instead of a single webpage. For example: i want to broken links for entire website of learn-automation.com/.
+bhargav sr You can pass url as the parameter then it will check.
Hi Mukesh..
Few links are missing using this code.
Suppose 31 links are thr, but status coming for 25 links
PLz explain ..why ?
It means some link will not have href attribute
No..actually some of the links having response code...301 (permanently moved)...as you have used condition (==200) that why i was missing few links..better to use (response code
HI Mukesh,
Executing same code.
But getting total number 53 but it's showing only one URL-->OK response.
url->google.com.
What could be the reason.
Hi Swapnali,
Check response code as well if the code is coming in 2XX category then all will be passed.
Hello Sir,
I have applied the broken link script to my application but & it showed me the expected result but the question comes how can i identify in the UI where the Link is not working or giving Wrong,
what is the way that I can explain to the developer that this is the particular space where you have given the wrong links
Hi Jayanti, you can capture text along with URL so that you will get to know which link is broken.
Hi Mukesh,
I tried the code provided by you. For the first time, it ran successfully.
But after that, I am keep on getting "connect timed out".
Could you please help me with this.
Hi Sir, Line number 50.. HttpsUrlConnection one.... Please help me to understand that. HttpUrlConnection is not an Interface.. it is a class . It looks like we are typecasting URL to HttpUrlConnection. Please explain sir. Thank you in advance.
Hi Mukesh , the code work fine, but i got this error when it was verifying the links:
java.net.MalformedURLException: unknown protocol: javascript for 2 urls,
can we deal with these or ignore it?
+Nikhil Kanojia Hi Nikhil please use try catch I above video I used throw which wont handle the exception
could you explain what are Desired Capabilities in Selenium WebDriver
Its working as per expections for single URL. But when i redirect website using selenium webdriver code it is giving "org.openqa.selenium.StaleElementReferenceException: stale element reference: element is not attached to the page document"
Can we write the code for this?
hi mukesh. i got this below error when i click a button how to fix it????
org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (1130, 27). Other element would receive the click: .
if u have time pls give some solution for me..
Hi Mukesh,
I tried to implement assertion for the script as said in the assignment. I am getting error in a mid quoting translate.google.com/?hl=en&tab=wT - forbidden - 404 expected [200] found [403]. I tried to open the link having this msg. It was of Google translate. It opened and worked fine.
Also when I run the script you have provided without assertion that script is working fine.
Can u please help with this assignment.
Can anybody tell me how to verify each link like if we click on some link it will navigate to other pager there we check like this
Hi Rehan, I would recommend you to use API for checking broken links. If you still want to check in such manner then follow below approach.
Click on Link
It will open another tab or window.
Switch to new window
verify title should not be blank or url or page source should not contain 404 error.
happy to all
how can i find broke url link in youtube description url working or not
Hi Rishu, here is the link learn-automation.com/find-broken-links-using-selenium/
I did try from my end, plz let me know if there is any other way,
right click on page, view source page> , in source page by finding link, got (Attribute, tagname with value).
then thru firepath, i wrote dynamic xpath, //a[@class='accessible_elem'] then found its hidden element.
plz let me know if there is any other way to find link????
+Zain Khokhar Hi Zain I have another way
1- get all a tag and get href attribute and pass url in get method and check if any page title contains page not found the mark as broken.
if you are thinking that this will take high execution time then please let headless browser in this case.
Below video will help you for headless
ua-cam.com/video/dEDtf8zJTKg/v-deo.html
Hi Mukesh,
I used your same code. But it was not getting executed after the httpURLConnect.setConnectTimeout(3000);. It was stuck in this stmt. it was not moved to the next stmt i.e. httpURLConnect.connect();. Can you please guide me?.
I requested others also. Kindly Advise me...
Can you please add video for broken/invalid images.Thank you
HI Pallavi same program will work just you have to use src attribute for images.
plz post video on selenium grid,,or sugesst me some,,,
Hey Neeraj yes i have planned will upload soon.
thnx for the prompt reply...
Is there a way to handle Authentication Required popup? Have to enter username and password. Thanks
Hi sir , I am using your code but sometimes i get null response and sometimes ok what does null signify even though the link is working why it is showing null
Thank you in advance
Hi Nav, some href have null values which points to same page. In your code you can handle null values.
Thank u so much sir
hi sir
connect(); method doesnt highlighted in my code by passing the object httpurlconnect
Hi Vijay, please cross check with below code learn-automation.com/find-broken-links-using-selenium/
Hey Mukesh, this is Upendra again. This post I am putting related to this video only. I tried to test with our applications. For some links I am getting response as "Moved Permanently" and "Moved Temporarily". I am getting this in else part of the below code. Can I know what does it means?
if(httpURLconnect.getResponseCode()==200){
System.out.println(linkURL+" - "+httpURLconnect.getResponseMessage());
}
else{
System.out.println(linkURL+" - "+httpURLconnect.getResponseMessage());
}
And anything got on my other post. You will save my life if you find something for me.Please...
Thanks,
Upendra
+Upendra D Sorry Mukesh, I got the answer. Whichever links are redirecting to some other links then those are giving these response. I should have checked before posting this. Sorry man.
But can you please find a way to my other comment in this video...
Mukesh,,, Really nice post as usual, and really like they way you teach.
how we will know if some or one link is broken. For example in facebook signup page this link not found
"facebook.com/allactivity?privacy_source=activity_log_top_menu - Not Found - 404" how we will find the link is belong to which element?
+Zain Khokhar Hi Zain in this case you have to check the title and verify the same because the above code wil check 404 only.. above facebook example is not for broken link
very nice!
+Shreyansh jain Thanks Bro
Please provide image and image text validation process.
How can we find broken links from entire website? not only from webpage? please. sir.
if the link is of blob, how to get the response codes?
Hi Achu, can you explain me your requirement in detail?
Yeah. The solution you have provided will work if src='someurl". But nowadays contents are like src="blob:someurl". Blob is nothing but generation of url at run time based of url memory address. All azure based data stored websites are constructed of this way. For example, inspect current page and try to take url of this video from video tag.
Great will check this and will let you know..
Thank you
Hi Mukesh! Thanks for you created this channel! It's my "holy book" (or better say "holy channel" :) ) for so many everyday stuff in automation! Your script for http protocol works just perfect, but for https protocols I have 2 scenarios.
№1scenario for link "websitename" I used
if (httpURLConnect instanceof HttpsURLConnection) {
HttpsURLConnection httpsURLConnect = (HttpsURLConnection) httpURLConnect;
..........
and it works fine.
№2 scenario for "www.websitename" the case is caught by a catch block. Any clue how to fix this? Thanks!
Hi Mukesh,
In this line
System.out.println(linkURL+"-"+httpURLConnect.getResponseMessage()+"-"+HttpURLConnection.HTTP_NOT_FOUND);
Why are you printing +"-"+HttpURLConnection.HTTP_NOT_FOUND
Can you please explain?
pls share the code