Chrome Extension to modify XHR under Selenium WebDriver
$30-250 USD
Closed
Posted about 4 years ago
$30-250 USD
Paid on delivery
I need reliable way to modify XHR request in Google Chrome from Selenium WebDriver C# session ([login to view URL] package) on a page that sends XHR very early (<script> in <head>), so Selenium (or anything else) should be ready to hook it before the page opens.
Expected way to do this is to develop Chrome Extension that modifies target XHR and to inject this Extension using Selenium.
If there is a way without Chrome Extension (just using C# and Selenium) possible and it is reliable (works 100% of cases with XHR in <script> in <head>) - it is also accepted.
I need some C# code like this:
using [login to view URL];
var chromeOptions = new ChromeOptions();
// TODO: That Chrome Extension should hijack XHR requests before page loads and modixy requests.
[login to view URL]("[login to view URL]");
var chrome = new ChromeDriver(chromeOptions);
[login to view URL]().GoToUrl("(link removed)/");
// Expected: XHR request made from <body> modified.