chrome.devtools.network

Best practices, code snippets for common functionality, examples, and guidelines.
SteveO_za
Posts: 4
Joined: Tue Apr 25, 2017 4:55 pm

chrome.devtools.network

Post by SteveO_za » Wed May 31, 2017 4:52 pm

Hi

Has anyone used Chrome development tools within Ranorex 7?

The scenario is that I load a web page, then once loaded and button pressed, a 'random' event is sent from the server and the page responds accordingly.
I would like to see what is in that response packet when it arrives (from the server) and then confirm that the web page has displayed the corresponding result.

The packet can be seen in Chrome Development Tools > Network
I'd like to be able to read that packet for certain values.

I could look at integrating a packet sniffer or something similiar, but since Chrome seems to do it already, I would hope it can accessed.

I have used Ranorex.WebDocument to execute a basic java script in Chrome Console, but it doesn't seem to listen for new events

Any ideas or experiences on how to proceed?

Thanks
Steve

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3945
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: chrome.devtools.network

Post by odklizec » Thu Jun 01, 2017 7:42 am

Hi,

If there is an API for Chrome dev tools, it should be possible for you to write a code to interact with it? A quick google search revealed these links:
https://github.com/MasterDevs/ChromeDevTools
https://chromedevtools.github.io/devtoo ... #extension
Hope these help a bit? ;)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

SteveO_za
Posts: 4
Joined: Tue Apr 25, 2017 4:55 pm

Re: chrome.devtools.network

Post by SteveO_za » Thu Jun 01, 2017 2:22 pm

Thanks

I was looking at similiar and was hoping for a simpler solution, I'm not getting it to work :D
Preferably with an example...

I'll keep on trying though

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3945
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: chrome.devtools.network

Post by odklizec » Thu Jun 01, 2017 2:25 pm

I'm afraid, I'm not using these devtools but I don't think there is a simpler solution (other than writing your own code for this). Good luck with implementation!
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration