Playwright .NET Automation
Budget: $15 – $25 USD
We have an existing .NET application that uses Playwright to automate browser interactions and log HTTPS requests and responses. The main goal is to capture and log all network traffic (requests and responses) for a specific web page.
Problem:
While our Playwright-based application successfully logs some requests and responses, it fails to capture others. Specifically, certain requests and responses that are crucial for our application do not appear in the logs. These missing requests/responses also do not show up in the Chrome DevTools Network tab when we inspect the page using Chrome. However, these requests are visible when using a network sniffer like Fiddler.
Possible Causes:
- Internal Requests: The missing requests might be internal (e.g., initiated by JavaScript running on the page after the initial load), and Playwright may not be capturing them because they are handled in a non-standard way.
- EventSource or WebSocket Requests: If the missing requests are using technologies like Server-Sent Events (SSE) or WebSockets, they might not be captured by the standard request handlers in Playwright.
- Browser-Specific Behavior: These requests might be created by the client-side (React.js or other frontend frameworks) after the page has fully loaded, which might cause Playwright to miss them.
We need someone to:
- Investigate why Playwright is not capturing these specific requests and responses.
Propose and implement a solution to ensure all network traffic, including these missing requests, is captured and logged.
- Consider alternative approaches if Playwright cannot achieve this. Potential alternatives could include using a different tool or library that can reliably capture all network traffic.
- Ensure that the solution works regardless of the browser version (since the end-users may have different versions of Chrome or Edge).
Additional Information:
The solution should work within a .NET environment and be possible to integrate with our existing application.
Existing application code is attached.
Problem:
While our Playwright-based application successfully logs some requests and responses, it fails to capture others. Specifically, certain requests and responses that are crucial for our application do not appear in the logs. These missing requests/responses also do not show up in the Chrome DevTools Network tab when we inspect the page using Chrome. However, these requests are visible when using a network sniffer like Fiddler.
Possible Causes:
- Internal Requests: The missing requests might be internal (e.g., initiated by JavaScript running on the page after the initial load), and Playwright may not be capturing them because they are handled in a non-standard way.
- EventSource or WebSocket Requests: If the missing requests are using technologies like Server-Sent Events (SSE) or WebSockets, they might not be captured by the standard request handlers in Playwright.
- Browser-Specific Behavior: These requests might be created by the client-side (React.js or other frontend frameworks) after the page has fully loaded, which might cause Playwright to miss them.
We need someone to:
- Investigate why Playwright is not capturing these specific requests and responses.
Propose and implement a solution to ensure all network traffic, including these missing requests, is captured and logged.
- Consider alternative approaches if Playwright cannot achieve this. Potential alternatives could include using a different tool or library that can reliably capture all network traffic.
- Ensure that the solution works regardless of the browser version (since the end-users may have different versions of Chrome or Edge).
Additional Information:
The solution should work within a .NET environment and be possible to integrate with our existing application.
Existing application code is attached.