question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inspect not working

See original GitHub issue

Environment (please complete the following information):

  • WebdriverIO version: 5.15.7
  • Mode: WDIO Testrunner
  • If WDIO Testrunner, running sync/async: async
  • Node.js version: v10.13.0
  • NPM version: 6.7.0
  • Browser name and version: Chrome 78.0.3904.108
  • Platform name and version: macOs 10.15.1
  • Additional wdio packages used (if applicable):@wdio/selenium-standalone

Config of WebdriverIO

exports.config = {
    runner: 'local',
    specs: [
        './test/specs/**/*.ts'
    ],
    exclude: [
        // 'path/to/excluded/files'
    ],
    maxInstances: 10,
    capabilities: [{
       
        maxInstances: 5,
        browserName: 'chrome',
     
    }],
    
    logLevel: 'trace',
    bail: 0,
    baseUrl: 'localhost:8100',
    waitforTimeout: 10000,
    connectionRetryTimeout: 90000,
    connectionRetryCount: 3,
    services: ['selenium-standalone'],
    framework: 'mocha',
    reporters: ['spec'],
    mochaOpts: {
        ui: 'bdd',
        timeout: 60000
    },
    before: function (config, capabilities, specs) {
        require('ts-node').register({
        project: './test/tsconfig.e2e.json'
        });
    },
}

Describe the bug Tried to stop the tests for inspection as written in the official docs The tests are not stopping.

To Reproduce Steps to reproduce the behavior:
./node_modules/.bin/wdio ./test/conf/wdio.conf.js --inspect-brk

Expected behavior The tests stop on the first line.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:27 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
mgttDevcommented, Jun 24, 2020

Hi, I tried the workaround @saito-tom suggested and it works. The NiM starts correctly and stops at the “debugger” statement. Anyway when I try to execute a live command (ie: “browser.getTitle()”) I just get a pending request and no results, here’s a screenshot. image On the wdio 4 I’m able to test the live commands using the console, any hints to get the same behaviour on wdio5?

Thanks

1reaction
mcelotticommented, Dec 21, 2019

I’m having the same problem with the --inspect/–inspect-brk options. Honestly I think this is a HUGE problem if compared to wdio 4, and despite my personal opinion I’d suggest finding a solution in order to prevent people from abandoning this beautiful framework.

All complex tests rely on page objects and require a powerful debugging support, REPL is not enough when you have page objects with many methods, inheritance etc.

What I do with v4 is: stop the execution with browser.debug() and then use chrome dev tools to debug node and call or check my page object methods (this is why I use the --inspect flag in order to start node in debug mode).

How can we achieve the same result with wdio 5?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Inspect Element Not working/blank - Stack Overflow
Inspect Element Not working/blank · try open new tab and enter view-source:<your page address>. – Arun Chandran Chackachattil · 1. There may be ......
Read more >
How do you unblock inspect element? - Quora
Incase you are using a plugin in wordpress try deactivating it or remove the piece of code from your website. then try to...
Read more >
Inspect Element not working - Google Groups
The inspect element feature in Firebug is no longer working for me. I think it has to do with Firefox 3.6 because I've...
Read more >
Inspect not working - InVision Support
On my old project Inspect is not working, showing the "Sync your source files" screen. I've tried to resync all artboards, doing some...
Read more >
How do I open the "inspect element" panel when right click ...
The accepted answer gives 3 options that work without modifying the code and running it locally, and avoids all the problems I've stated....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found