I had a task to run the test case by making chrome browser offline and run some steps and then i need back online again and run the rest of the test case.
Can anyone guide me on how to make chrome browser offline.
I have attached a image of chrome browser. In the network tab it had an option of making it offline. I want to make that offline using katalon.
Thanks in advance.
To the best of my knowledge, there is no such feature built into Chrome.
- The old
chrome://flags feature was removed some time ago.
- The facility under Network (in DevTools in your screenshot) is designed to emulate poor network conditions but I don’t believe that’s accessible from outside DevTools.
Idea 1: I suppose it might be possible to start a test using the Windows API set, then conduct the rest of the test using WebUI API set. I have never tried this.
Idea 2: (@Brandon_Hein) Using Desired Capabilities it might be possible to set Chrome to use a proxy server. If that proxy server is some non existing server address then you would be effectively offline.
All of this begs the question: What are you trying to test? Caching?
Idea3: shut down the network connection via 3d party script
That will be true offline mode
Idea4: there are some topics about devtools api and how to use it programtically.
Seems like from devtools is the only option left to have chrome in offline mode since 3x.something version
Feel free to dig into
Thanks for your response @Russ_Thomas
I wanted to run the test case in offline mode. We had a website that is offline supported(we can use the website without any network connection) once after it is accessed online, so I need to test the website by setting the chrome to the offline mode which is present in the chrome developer consoles network tab. That’s the place i needed some help about how to set it to offline mode using katalon.