selenium icon indicating copy to clipboard operation
selenium copied to clipboard

With Javascript, logging in console does not work in 3.8.1, but it worked in 3.6

Open MagicPoulp opened this issue 8 years ago • 1 comments

Meta -

OS:
Debian 9

Selenium Version:
selenium-3.8.1 (not in npm but built from repo). I need this newer version for using firefox actions API. b588bf52930fd4c51bbc9f9283dd0a92372b9383 added firefox support for w3c actions and I need it.

Browser:
Chrome and Firefox

chromium: Version 62.0.3202.89 (Developer Build) built on Debian buster/sid, running on Debian 9.2 (64-bit) firefox: 57

Expected Behavior -

warnings are visible: [2017-12-14T08:40:59Z] [WARNING] [promise.ControlFlow] Detected scheduling of an unchained task.

Actual Behavior -

empty console output

Steps to reproduce -

This is the commit that first introduced the issue. c063bb8d48e5c0afb2fc790c7894119a7bfa6627 "[js] Stop using the promise manager in the main WebDriver class." The commit just before does not have the issue.

I copy pasted the logging example without modification (except for using chrome or firefox). https://github.com/SeleniumHQ/selenium/wiki/WebDriverJs

When using 3.6 from npm, the logging works. When using the version 3.8.1, built manually after clone, it stops working.

import { Builder, By, logging, until } from 'selenium-webdriver';

describe("try", function() {
    it("try", function() {
        logging.installConsoleHandler();
        logging.getLogger('promise.ControlFlow').setLevel(logging.Level.ALL);

        let driver = new Builder()
            .forBrowser('chrome')
            .build();

        driver.get('http://www.google.com/ncr');
        driver.findElement(By.name('q')).sendKeys('webdriver');
        driver.findElement(By.name('btnK')).click();
        driver.wait(until.titleIs('webdriver - Google Search'), 1000);
        driver.quit();
    })
})

MagicPoulp avatar Dec 14 '17 08:12 MagicPoulp

promise.ControlFlow doesn't exist anymore, so you won't see logging statements from it.

jleyba avatar Dec 17 '17 21:12 jleyba