2

Is there any possibility to leave dev tools (inspector) opened during a robot test run? I included a manual step into my "semi-automated" test in which I open the dev tools (F12), but after click on PASS for the Execute Manual Step other automated steps follow and the dev tool is immediately automatically closed. Just overview of the structure of my test:

Semi-automated robot test
    do some automated steps
    execute manual step     open developers console
    do some other automated steps
    execute manual step     check something in dev console

I have no idea how to handle the dev tools during robot test. Even if I open the dev tool in separate window during the manual step, it is still closed during automated steps...

Thanks for any idea :-)

2
  • Why do you need to keep devconsole open? What exactly you want check during test run? Commented Mar 6, 2017 at 13:42
  • I need to check some request filling in network tab and if I open it AFTER the steps are done, there is nothing.. Commented Mar 6, 2017 at 13:44

3 Answers 3

4

It isn't possible. From ChromeDriver help center

When you open the DevTools window, ChromeDriver is automatically disconnected. When ChromeDriver receives a command, if disconnected, it will attempt to close the DevTools window and reconnect.

If you need to inspect something in DevTools, the best you can do now is pause your test so that ChromeDriver won't close DevTools. When you are done inspecting things in Chrome, you can unpause your test and ChromeDriver will close the window and continue.

Sign up to request clarification or add additional context in comments.

Comments

2

As an example to the answer of @Guy you can use the Dialogs library in Robot Framework

*** Settings ***
Library    Dialogs

*** Test Cases ***
test case
   Pause Execution    Please Press OK to Continue. 

This will then show you the following alert type of box.

enter image description here

1 Comment

I am using Dialogs for manual step execution, but this command will not help me, because I don't want to pause the execution, I need the automated steps to be executed...As Guy mentioned, there is not really a way to do what I need and how I need. Becsuse I need to inspect the dev tools right DURING automated step execution...
1

If you just want to get information about HTTP-requests that were sent during your Seelenium test-run you might need to add below code, that will constantly print out logs with required info:

import logging
import http.client as client

client.HTTPConnection.debuglevel = 1
logging.basicConfig()
logging.getLogger().setLevel(logging.DEBUG)
requests_log = logging.getLogger("selenium.webdriver.remote.remote_connection")
requests_log.setLevel(logging.DEBUG)
requests_log.propagate = True

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.