You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe this is due to selenium requesting elements from the HTML DOM. It has to wait for them and sometimes it takes too long to get the elements. Sometimes not. We can continue to add sleep commands to fix this.
More details...like javascript selenium requests objects and acts on them. Sometimes an element is a pop-up window. On that pop-up window could be a button selenium wants to click. If that pop-up hasn't loaded into selenium before it asks to click the button, selenium waits to get the button, but it never will as there was no button to click. Eventually waiting to click the button may time out.
Interesting. Ideally we'd like to avoid these random failures because it is quite misleading. If adding some wait is sufficient to solve this then let's do it. I'm not sure if it is normal to need this or if it is bad practice.
It smells like bad practice and could need tweaking over time continuously. This may become an issue as codabench grows and or more tests are added.
The fundamental issue is that javascript can have its code written so that functions are forced to wait on each other to finish before carrying on. Maybe we can do the same with selenium and implement a "wait till the previous command finishes" versus a random tweaked sleep which may or may not be enough time.
# This clicks the page before it loads fully, delay it a bit...
self.wait(1)
self.find('.item[data-tab="participate-tab"]').click()
This code works only if the page indeed loaded within the 1 second specified by self.wait(1) and the "participate-tab" exists. It would be better to attach a .until() somehow.
Activity
bbearce commentedon Oct 11, 2022
I believe this is due to selenium requesting elements from the HTML DOM. It has to wait for them and sometimes it takes too long to get the elements. Sometimes not. We can continue to add sleep commands to fix this.
More details...like javascript selenium requests objects and acts on them. Sometimes an element is a pop-up window. On that pop-up window could be a button selenium wants to click. If that pop-up hasn't loaded into selenium before it asks to click the button, selenium waits to get the button, but it never will as there was no button to click. Eventually waiting to click the button may time out.
Didayolo commentedon Oct 11, 2022
Interesting. Ideally we'd like to avoid these random failures because it is quite misleading. If adding some wait is sufficient to solve this then let's do it. I'm not sure if it is normal to need this or if it is bad practice.
bbearce commentedon Oct 11, 2022
It smells like bad practice and could need tweaking over time continuously. This may become an issue as codabench grows and or more tests are added.
The fundamental issue is that javascript can have its code written so that functions are forced to wait on each other to finish before carrying on. Maybe we can do the same with selenium and implement a "wait till the previous command finishes" versus a random tweaked sleep which may or may not be enough time.
bbearce commentedon Oct 11, 2022
I see this for instance:
https://www.selenium.dev/documentation/webdriver/waits/
Example:
The .until() is waiting for something. It still has a timeout but we can adjust that.
What we have is this:
https://github.com/codalab/codabench/blob/develop/src/tests/functional/test_submissions.py
line
This code works only if the page indeed loaded within the 1 second specified by self.wait(1) and the "participate-tab" exists. It would be better to attach a .until() somehow.
Didayolo commentedon Mar 23, 2023
Should be fixed by:
Didayolo commentedon Apr 21, 2023
Didayolo commentedon Apr 27, 2023
The scoring logs are not fully written inside the "submission_output" container (the black box) for this test competition: