1

How can I do a basic authentication via chrome remote debugging?

That is I have a chrome running in remote debug like this

chrome.exe –remote-debugging-port=9222

then I use WebSocket4Net to comunicate with chrome. I would like to automate the basic authentication, by passing user and password in the json. I know that I could do simply

https://username:password@www.example.com/

but I would like also to try to pass them in the json.

I also have another question related to this.. Is it possible to pass in the json a javascript expression to evaluate? I have a javascript function to evaluate in order to get an id in a webpage

var children = document.body.getElementsByTagName('*');
var id='userScreenName';
var elements = [], child;
for (var i = 0, length = children.length; i < length; i++) {
   child = children[i];
   if (child.id.indexOf(id)>-1)
       elements.push(child);
};
return elements[0].id;
ayasha
  • 1,221
  • 5
  • 27
  • 46

1 Answers1

0

it's not possible because chrome ins't a web server, but you can open firewall only a specific local or external client.

r1si
  • 1,136
  • 2
  • 19
  • 34