How to intercept the network outgoing request from AWS device farm

0

We need to intercept the request headers sent from the AWS device farm desktop browsers while running our selenium tests. as we AWS device farm does not support selenium devtools features (that help intercept and get the requests informations), do you propose something to achieve this?

Thanks in advance

Zahra
asked 2 months ago112 views
2 Answers
2

To intercept network requests from desktop browsers in AWS Device Farm while running Selenium tests, there are a few workarounds to consider since AWS Device Farm does not directly support request interception or Selenium DevTools features.

These workarounds include setting up a proxy server and configuring the browsers to route traffic through it, capturing network traffic at the network level using tools like Wireshark or tcpdump, adding logging or debugging statements to the application code, or leveraging remote debugging capabilities of some browsers by running tests in a custom environment or using services like BrowserStack or Sauce Labs.

However, these approaches may require additional setup, configuration, and may not provide the same level of integration as built-in Selenium DevTools features.

profile picture
EXPERT
answered 2 months ago
EXPERT
Leo K
reviewed 2 months ago
1

Hi,

To achieve your use-case, you can make use of man in the middle proxy which during your device farm session in order to capture network traffic for analysis. This method is only available for Android devices in custom environment mode execution (for iOS, these things are possible, but require more automation on your part)

We support the standard Selenium desired capability for configuring your browser to connect to the internet through a proxy. The key factor to ensuring that your proxy works is that your proxy allows the browser to connect to it. You can do this by allowlisting your IP addresses to connect to your proxy at your proxy's port.

If you would like to know more about it on achieving the use-case, I would suggest you to raise the technical support case with DeviceFarm with your detailed use=case so that we can assist you in-depth and provide you better workaround is needed,

Thanks

[+] https://docs.aws.amazon.com/awssupport/latest/user/case-management.html#creating-a-support-case

AWS
answered 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions