Reputation: 65
I am trying to retrieve the ajax calls (post, get, put...) that show up in the console of a website with Robot Framework. I could do it with How to read the web console output with robot framework and selenium?. However the console only logs the ajax calls when the "Log XMLHttpRequests" is checked in the developer tools settings. by default it is not, so I do not see the calls in the returned log. Do you know how to have that box clicked in the "settings" via Robot Framework/Selenium? Thank you.
Upvotes: 1
Views: 507
Reputation: 7281
Update the logging capabilities with the performance=ALL
in addition to the browser=ALL
like:
*** Variables ***
&{browser logging capability} browser=ALL performance=ALL
&{capabilities} browserName=chrome version=${EMPTY} platform=ANY goog:loggingPrefs=${browser logging capability}
Then retrieve the additional logs from the webdriver like:
${log entries}= Evaluate $webdriver.get_log('performance')
Upvotes: 1