3

Google Chrome does not render fonts when run with selenium and chromedriver. Code see below.

The same issue occurs when opening chrome from the terminal with /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome

It looks like this: Screenshot of chrome not showing fonts with google start page opened.

Setup:

  • Google Chrome Version 67.0.3396.99
  • macOS sierra, Version 10.12.6
  • "chromedriver": "^2.40.0" (package.json)
  • "selenium-webdriver": "^4.0.0-alpha.1"
  • node.js v9.11.1

This is my code for running chrome with wedriver:

    const {Builder} = require('selenium-webdriver');
    require('chromedriver');
    async function run(){
        let driver = await new Builder().forBrowser('chrome').build();
        await driver.get('http://www.google.com/');
        await driver.executeAsyncScript(function() {
            let callback = arguments[arguments.length - 1];
            let fiveSeconds  = 5000
            window.setTimeout(callback, fiveSeconds);
        });
    }
    run();

It is the same issue as described here: Google Chrome shows no text/fonts when opened with selenium

Changing system language to english seems to be a workaround, but that's not an option for me.

This error occured for the first about a month ago.

When querying text elements with selenium, they are recognized and marked as visible.

Is this a chrome bug or am I doing something wrong?

Thanks for help.

julip
  • 31
  • 3

0 Answers0