How To Find Broken Links Using Selenium With Java

Поділитися
Вставка
  • Опубліковано 11 гру 2024

КОМЕНТАРІ • 155

  • @robingajbhiye1291
    @robingajbhiye1291 8 років тому +1

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

    • @Mukeshotwani
      @Mukeshotwani  8 років тому +1

      +Robin Gajbhiye Hi Robin it is in queue will upload soon.

  • @pranalikumbhare3547
    @pranalikumbhare3547 8 років тому

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

    • @Mukeshotwani
      @Mukeshotwani  8 років тому

      +Pranali Kumbhare Thank you pranali let me know if any help from my side.

    • @pranalikumbhare3547
      @pranalikumbhare3547 8 років тому

      +Mukesh otwani Ofcourse

  • @kittu245
    @kittu245 8 років тому

    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

    • @Mukeshotwani
      @Mukeshotwani  8 років тому +1

      +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.

  • @RajaRam-fv1mm
    @RajaRam-fv1mm 7 років тому

    Hi, Mukesh thank you so much for your Tutorials. Your tutorials helped me a lot to learn selenium

  • @prasannakulkarni3350
    @prasannakulkarni3350 8 років тому

    superb bro.....i get the concept very clearly seeing your videos

    • @Mukeshotwani
      @Mukeshotwani  8 років тому

      +prasanna kulkarni Thanks Prasanna

  • @shafaathussain6104
    @shafaathussain6104 8 років тому

    Really Nice , You made it simple and easy to understand , Thanks a Lot

    • @Mukeshotwani
      @Mukeshotwani  8 років тому

      +shafaat hussain Hi Shafft glad to know it helped you .

  • @coco3625
    @coco3625 8 років тому

    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.

    • @maxwellonyx9636
      @maxwellonyx9636 3 роки тому

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

    • @sorencarmelo4201
      @sorencarmelo4201 3 роки тому

      @Maxwell Onyx definitely, I've been using Instaflixxer for months myself =)

  • @neetugupta8019
    @neetugupta8019 6 років тому +1

    Always like Sir..great effort from your side for us....Thank you very much ...

    • @Mukeshotwani
      @Mukeshotwani  6 років тому

      🙏🙏🙏🙏 Thanks Neetu whenever u need any help don't hesitate to contact me

  • @AbhishekTak5
    @AbhishekTak5 4 роки тому +1

    Thank you Mukesh for this!!!perfectly explained !!

  • @manikantanagudu4967
    @manikantanagudu4967 8 років тому

    Hi Mukesh really nice viedo.
    please post viedo reading How to handle broken images in selenium Webdriver.

  • @stanu1159
    @stanu1159 6 років тому

    Hi sir u r teaching is awesome..please upload. Video's on java programming

  • @survivorfighter4683
    @survivorfighter4683 4 роки тому +1

    Total Life Saver!! Thank You!

    • @Mukeshotwani
      @Mukeshotwani  4 роки тому +1

      Thank you mate, I am glad to know that my video has helped you.

  • @ioriiori
    @ioriiori 4 роки тому +2

    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 .

    • @Mukeshotwani
      @Mukeshotwani  4 роки тому +2

      You can convert List into Set which will remove duplicate element or items.

  • @fahimkhatri4467
    @fahimkhatri4467 8 років тому

    This is so cool !!! super... always worth watching your videos.

    • @Mukeshotwani
      @Mukeshotwani  8 років тому

      thanks Fahim keep visiting happy weekend..

  • @sonalipradhan6050
    @sonalipradhan6050 7 років тому

    Hi, Mukesh really this broken links video is very helpful. Can you pl suggest how to write assert method for broken links in testNG.

  • @alka240280
    @alka240280 5 років тому +1

    Thank you for the awesome explanation!

    • @Mukeshotwani
      @Mukeshotwani  5 років тому

      Thank you Sharma ji .. Please do watch other videos too and let me know if you have any doubt.

  • @sachinjaiswal9054
    @sachinjaiswal9054 6 років тому +1

    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.

    • @Mukeshotwani
      @Mukeshotwani  6 років тому

      Hi Sachin,
      Please follow below document/link for TestNG
      ua-cam.com/video/OTtFSnZY4f8/v-deo.html

    • @sachinjaiswal9054
      @sachinjaiswal9054 6 років тому

      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

  • @mahendratiwary3689
    @mahendratiwary3689 6 років тому +2

    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?

    • @Mukeshotwani
      @Mukeshotwani  6 років тому +1

      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.

  • @jeevankale1
    @jeevankale1 8 років тому +1

    Hi Mukesh...One query this count is the only for that particular page ya entire application link count?

    • @Mukeshotwani
      @Mukeshotwani  8 років тому

      You can use for single link as well.

  • @nitingupta82
    @nitingupta82 8 років тому

    Superb! Another exciting way to find Terror sorry Error, HTTP Response Code 404!! :)

  • @hennymakaveli
    @hennymakaveli 8 років тому +1

    Hello Mukesh, can you make a video/tutorial on broken image link, especially the verification method that you will pass the image argument to?

    • @Mukeshotwani
      @Mukeshotwani  7 років тому +1

      Hi Oludare you can use src attribute for images and follow the same video.

  • @piyush12071990
    @piyush12071990 8 років тому

    You are awesome Bro..

    • @Mukeshotwani
      @Mukeshotwani  8 років тому

      +piyush RAGHATATE Thanks Piyush :) keep visiting other videos as well and let me know if any help from myside.

  • @sachinjaiswal9054
    @sachinjaiswal9054 6 років тому +1

    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

    • @Mukeshotwani
      @Mukeshotwani  6 років тому

      Hey Sachin where is your confusion?

  • @jgsidenotes
    @jgsidenotes 6 років тому +1

    Hi thank you for this helpful tutorial, but what about if I want to test the whole website links? with multiple pages

    • @Mukeshotwani
      @Mukeshotwani  6 років тому +1

      Hi Jomari in that case we have to keep calling the method which we created for each and every page.

  • @staslocovai
    @staslocovai 3 роки тому +1

    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

    • @Mukeshotwani
      @Mukeshotwani  3 роки тому +1

      No prob mates, loved your honesty. I will try to this scenario too.

    • @staslocovai
      @staslocovai 3 роки тому

      Thanks a lot !)

  • @deepakjaiswal5516
    @deepakjaiswal5516 8 років тому

    hello sir please upload some video for data driven framework from basics to advance...

  • @dipukakati4
    @dipukakati4 7 років тому

    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

  • @ishanmittal4732
    @ishanmittal4732 7 років тому

    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?

  • @SuyashNande
    @SuyashNande 7 років тому +1

    Awesome video. thanks!

  • @rachnasingh239
    @rachnasingh239 6 років тому

    Hi Mukesh.. Could you please do a session on Selenium in Sauce lab using Tunnel

  • @udaybenake206
    @udaybenake206 7 років тому +1

    Hey mukesh could you explain what is verifyLinkActive() is

    • @Mukeshotwani
      @Mukeshotwani  7 років тому

      I just created lib for reusing purpose

  • @nexonsamuel
    @nexonsamuel 8 років тому

    Hello!!!Can you please make a video demonstrating how to work with context clicks and other such right click options???

    • @Mukeshotwani
      @Mukeshotwani  8 років тому +1

      +Nexon Samuel Hi Nexon sure will make soon. You can visit my blog in meantime for the same.learn-automation.com/selenium-advance-activity/

    • @nexonsamuel
      @nexonsamuel 8 років тому

      +Mukesh otwani Thank You So much!!!!Eagerly waiting

  • @manikandanparthiban4165
    @manikandanparthiban4165 7 років тому +1

    Hi Mukesh. I'm trying to check if a certain image is present in a pdf. Could you recommend any API? Thanks

    • @Mukeshotwani
      @Mukeshotwani  7 років тому

      Hi Mani,
      This will help you read pdf file content
      org.apache.pdfbox
      pdfbox
      2.0.6

    • @manikandanparthiban4165
      @manikandanparthiban4165 7 років тому

      Thank you Mukesh. I used itext pdf and I was able to do the validation.

  • @shaibalahmed7891
    @shaibalahmed7891 3 роки тому

    Thank You Mukesh!

  • @Ravi-qx8gg
    @Ravi-qx8gg 4 роки тому

    Super explanation

  • @upendrad6081
    @upendrad6081 8 років тому

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

    • @Mukeshotwani
      @Mukeshotwani  8 років тому

      +Upendra D is it fixed?

    • @upendrad6081
      @upendrad6081 8 років тому

      Not fixed Mukesh. That would be great if u can give me a way...

    • @upendrad6081
      @upendrad6081 8 років тому

      +Mukesh otwani hi, Mukesh got any way for this please?

    • @upendrad6081
      @upendrad6081 8 років тому

      +Upendra D Hi Mukesh, Sorry to followup again and again. But got struct here. Can you please help me out there...

  • @traghavendra9828
    @traghavendra9828 5 років тому

    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

  • @joshnasravani963
    @joshnasravani963 7 років тому

    Hi Mukesh....
    can u plz tell me how to handle captcha box using selenium webdriver....

    • @akhilagautham9997
      @akhilagautham9997 7 років тому

      Joshna Sravani you can't handle captcha using selenium web driver

  • @tasneemtechno4014
    @tasneemtechno4014 7 років тому +1

    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.

    • @Mukeshotwani
      @Mukeshotwani  7 років тому

      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.

    • @tasneemtechno4014
      @tasneemtechno4014 7 років тому

      and what about showing 120 out of 140 in console?

  • @jitendrasahu5493
    @jitendrasahu5493 7 років тому

    Very Helpfull vidio sir

  • @sourisengupta
    @sourisengupta 7 років тому

    Hi Mukesh, what if we get SSLHandshakeException when we are doing httpURLConnect.connect();
    How to handle this situation?

  • @praveshchourasia9688
    @praveshchourasia9688 6 років тому +1

    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?

    • @Mukeshotwani
      @Mukeshotwani  6 років тому

      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

  • @mudaseer21
    @mudaseer21 4 роки тому +1

    nice mukesh

  • @priyankagolewal3502
    @priyankagolewal3502 6 років тому +1

    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

    • @Mukeshotwani
      @Mukeshotwani  6 років тому

      HTTPClient is the library to test API’s.
      HTTPURLconnection is the class to connect to sever through http protocol

    • @priyankagolewal3502
      @priyankagolewal3502 6 років тому

      and how to test broken images?

  • @halabadr2571
    @halabadr2571 7 років тому

    Hello Mukesh,
    how can we print the final result & count of the Active and Broken links ?

  • @monil.joshi4
    @monil.joshi4 4 роки тому

    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

  • @saiedtrefi5487
    @saiedtrefi5487 8 років тому

    Thanks great video

  • @21suhana
    @21suhana 4 роки тому +1

    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

    • @Mukeshotwani
      @Mukeshotwani  4 роки тому +1

      Hi Suhana, can you share your code? which application you have used?

    • @21suhana
      @21suhana 4 роки тому

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

    • @21suhana
      @21suhana 4 роки тому

      FYI I'm using company website

  • @bhargavsr84
    @bhargavsr84 8 років тому

    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/.

    • @Mukeshotwani
      @Mukeshotwani  8 років тому

      +bhargav sr You can pass url as the parameter then it will check.

  • @HarshVardhan-ws4cq
    @HarshVardhan-ws4cq 7 років тому +1

    Hi Mukesh..
    Few links are missing using this code.
    Suppose 31 links are thr, but status coming for 25 links
    PLz explain ..why ?

    • @Mukeshotwani
      @Mukeshotwani  7 років тому

      It means some link will not have href attribute

    • @HarshVardhan-ws4cq
      @HarshVardhan-ws4cq 7 років тому

      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

  • @suryawanshiswapnali8834
    @suryawanshiswapnali8834 7 років тому +1

    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.

    • @Mukeshotwani
      @Mukeshotwani  7 років тому

      Hi Swapnali,
      Check response code as well if the code is coming in 2XX category then all will be passed.

  • @jayantiborde899
    @jayantiborde899 5 років тому +1

    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

    • @Mukeshotwani
      @Mukeshotwani  5 років тому

      Hi Jayanti, you can capture text along with URL so that you will get to know which link is broken.

  • @sharmishthaneogi5669
    @sharmishthaneogi5669 6 років тому

    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.

  • @richaranjan6555
    @richaranjan6555 3 роки тому +1

    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.

  • @nikhilkanojia1683
    @nikhilkanojia1683 8 років тому

    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?

    • @Mukeshotwani
      @Mukeshotwani  8 років тому

      +Nikhil Kanojia Hi Nikhil please use try catch I above video I used throw which wont handle the exception

  • @pavankumar-os3op
    @pavankumar-os3op 7 років тому

    could you explain what are Desired Capabilities in Selenium WebDriver

  • @shubhamshinde2499
    @shubhamshinde2499 7 років тому

    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?

  • @surendharrt2843
    @surendharrt2843 7 років тому

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

  • @shruthimp4945
    @shruthimp4945 6 років тому

    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.

  • @abraham2961
    @abraham2961 5 років тому +2

    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

    • @Mukeshotwani
      @Mukeshotwani  5 років тому

      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.

  • @amanmittal5848
    @amanmittal5848 2 роки тому +1

    happy to all

  • @rrr_earn
    @rrr_earn 5 років тому +1

    how can i find broke url link in youtube description url working or not

    • @Mukeshotwani
      @Mukeshotwani  5 років тому

      Hi Rishu, here is the link learn-automation.com/find-broken-links-using-selenium/

  • @zainykhokhar
    @zainykhokhar 8 років тому

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

    • @Mukeshotwani
      @Mukeshotwani  8 років тому

      +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

  • @Imrankhan-xw4me
    @Imrankhan-xw4me 7 років тому

    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?.

    • @Imrankhan-xw4me
      @Imrankhan-xw4me 7 років тому

      I requested others also. Kindly Advise me...

  • @pallavisenapati8214
    @pallavisenapati8214 7 років тому +1

    Can you please add video for broken/invalid images.Thank you

    • @Mukeshotwani
      @Mukeshotwani  7 років тому

      HI Pallavi same program will work just you have to use src attribute for images.

  • @GinShu.
    @GinShu. 8 років тому

    plz post video on selenium grid,,or sugesst me some,,,

    • @Mukeshotwani
      @Mukeshotwani  8 років тому

      Hey Neeraj yes i have planned will upload soon.

    • @GinShu.
      @GinShu. 8 років тому

      thnx for the prompt reply...

  • @manikandanparthiban4165
    @manikandanparthiban4165 7 років тому

    Is there a way to handle Authentication Required popup? Have to enter username and password. Thanks

  • @navnaawie6016
    @navnaawie6016 3 роки тому +1

    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

    • @Mukeshotwani
      @Mukeshotwani  3 роки тому

      Hi Nav, some href have null values which points to same page. In your code you can handle null values.

  • @karna1surya41
    @karna1surya41 2 роки тому

    Thank u so much sir

  • @vijaysavale5928
    @vijaysavale5928 6 років тому +1

    hi sir
    connect(); method doesnt highlighted in my code by passing the object httpurlconnect

    • @Mukeshotwani
      @Mukeshotwani  6 років тому

      Hi Vijay, please cross check with below code learn-automation.com/find-broken-links-using-selenium/

  • @upendrad6081
    @upendrad6081 8 років тому

    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

    • @upendrad6081
      @upendrad6081 8 років тому

      +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...

  • @zainykhokhar
    @zainykhokhar 8 років тому

    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?

    • @Mukeshotwani
      @Mukeshotwani  8 років тому

      +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

  • @shreyanshjain2347
    @shreyanshjain2347 8 років тому

    very nice!

  • @sandeepkumar1640
    @sandeepkumar1640 7 років тому

    Please provide image and image text validation process.

  • @ilyasyar
    @ilyasyar 4 роки тому

    How can we find broken links from entire website? not only from webpage? please. sir.

  • @tsachu9212
    @tsachu9212 4 роки тому

    if the link is of blob, how to get the response codes?

    • @Mukeshotwani
      @Mukeshotwani  4 роки тому

      Hi Achu, can you explain me your requirement in detail?

    • @tsachu9212
      @tsachu9212 4 роки тому +1

      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.

    • @Mukeshotwani
      @Mukeshotwani  4 роки тому

      Great will check this and will let you know..

    • @tsachu9212
      @tsachu9212 4 роки тому

      Thank you

  • @olenarogalska4085
    @olenarogalska4085 7 років тому

    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!

  • @AshishDubeyash4you
    @AshishDubeyash4you 6 років тому

    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?

  • @laxmirukka3028
    @laxmirukka3028 8 років тому

    pls share the code