Offline mode for chrome

72 views
Skip to first unread message

alans09

unread,
Aug 26, 2021, 5:51:33 AM8/26/21
to robotframework-users
Hi all,

 I have issue with setting chrome to offline mode because of some issues with new driver and chrome.

I'm Using this function:

def set_browser_offline(self):
""" Sets browser to offline mode
Example:
| Set Browser Offline |
"""
if not self.patched:
    self._monkeypatch_driver()
self.driver.set_network_conditions(
    offline=True, latency=5,
    download_throughput=500 * 1024,
    upload_throughput=500 * 1024,
)


It was working several moths ago, but nowadays it is ignores. if I 'get_network_conditions'  it will tell me that I'm offline, but it is not true.


This is the call, that is made:


There are information about that it is no longer possible, and I should try async/await.

Any idea how to rework SeleniumLibrary to be able to set browser to offline again?

Thanks

Tomas Pekarovic

unread,
Aug 30, 2021, 9:27:24 AM8/30/21
to robotframework-users
Ok I found out that this is a problem of the service workers. They just ignore the page offline and work like nothing happened.

--
You received this message because you are subscribed to a topic in the Google Groups "robotframework-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/robotframework-users/36R4LBDOuAI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to robotframework-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/robotframework-users/e41ae24d-41f8-4c1a-8be0-f684e04236a7n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages