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.

Wait Until Element Is Visible and Wait Until Element Is Not Visible log about 45 kilobytes of JS code on DEBUG level

See original GitHub issue

For issues

Steps to reproduce the issue

Can be reproduced with at least Chrome and Firefox.

*** Settings ***
Library    SeleniumLibrary

*** Test Cases ***
Test Case
   Open Browser    https://robotframework.org/    firefox
   Wait Until Element Is Visible    introduction
   Close Browser

Error messages and additional information

image

JavaScript code seems to originate from C:\Python37\Lib\site-packages\selenium\webdriver\remote\isDisplayed.js

Expected behavior and actual behavior

Expected behavior: visibility would be checked without logging JavaScript code.

Actual behavior: 45 056 bytes of JavaScript is logged each time Wait Until Element Is Visible or Wait Until Element Is Not Visible is called. Our recent log file exceeded 500 megabytes in size because these keywords were called over 10,000 times during the test run.

This is relatively new change as I don’t remember seeing this in spring 2019.

Environment

Browser: Chrome 78, Firefox 70 Browser driver: ChromeDriver 78, GeckoDriver 0.26.0 Operating System: Windows 10 Libraries

  • Robot Framework: 3.1.2
  • Selenium: 3.141.0
  • SeleniumLibrary: 4.1.0
  • Interpreter: Python 3.7.4

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
aaltatcommented, Nov 13, 2019

The logging which causes the problem is generated by the underlying Selenium (or some other Python library that Selenium uses) and it can not directly controlled by the SeleniumLibrary. But getting the logger from the downstream libraries, example like in this stackoverflow and setting the loglevel to something which prevent the logging to be visible could be doable. Needs some investigation.

@VilleSalonen do you think that it would sufficient to control in a library level? There perhaps could be import level argument and a new keywords to set the Selenium level logging to something. Example something like this:

*** Settings ***
Library    SeleniumLibrary    selenium_log_level=INFO

*** Test Cases ***
Example
    Set Selenium Log Level    CRITICAL
    Open Browser    ${URL}    chrome
    [Teardown]    Close All Brows

And if test case is run with --logelvel trace from command line, it would not log anything from Selenium side. What do you think?

0reactions
ritikasaboocommented, Dec 9, 2019

@colourmein13 it’s not visible on the log level you used

Yep, realized that a second after I posted.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Selenium - Wait until element is NOT visible - Stack Overflow
The idea is to wait until element is not visible. First line sets wait time that element has to disappear; here it's 10...
Read more >
Step-by-Step Selenium: Wait Until Element Is Visible - Testim.io
Here's a common scenario when using Selenium: wait until an element is visible. Here, learn why waiting matters and how to do it....
Read more >
Desktop Studio Developer Guide - SAP Help Portal
Wait Until the Popup Closes and Get the Popup Result. ... to view page elements not shown in the DOM, like JavaScript code...
Read more >
Issue 2198: ChromeDriver 2.34 doesn't wait until iframe ...
This bug happens in Chrome >64 and chrome-driver > 2.33, when running protractor test. ... trying to click on any element in the...
Read more >
Fix list for IBM WebSphere Application Server V8.5
IBM WebSphere Application Server provides periodic fixes for the base and Network ... Plug-in, PH21258, z/OS plugin bld version does not show fix...
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