Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update atests with preconfigured webdriver #1861

Conversation

emanlove
Copy link
Member

Once the driver is preconfigured these will update the tests, noting it resolves all issue under Python 3.7 (now at end of life) but not all within Python 3.9. Working in another branch to update Python versions.

We want to setup Chrome before we execute the tasks so that we can avoid
selenium-manager doing at the time of execution and changing the debug
log messages.
To avoid having the extra logging for selenium-manager (or at least to
control the debug output) we are setting the executable_path or the path
to the driver. Trying with the event_firing_webdriver script to see if
we see debug output there.
There is apparently a method for setting variables. Basically,

echo "{environment_variable_name}={value}" >> "$GITHUB_ENV"

Trying this out ..

Reference:
https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable
There were a couple tests when I updated the expiry date to variable
based upon today had hard coded expected values. To fix I added another
far in the future (from now) date to use for these few tests. This
actually might be complicating things too much and instead just stay
with anouther cookie and hard code it two years out.
There was some missed chnages to the log. In addition, Chrome now has a
limit on length of expiry with cookies. Its maximum length is 400 days,
as per, https://developer.chrome.com/blog/cookie-max-age-expires/. As
such back off the far future date to one just about a year out. Starting
to think the hardcoded expiry is better in that one can immediately see
it it verse the calculate some date in the future each time the test is
run. Will revisit this in the future.
@emanlove emanlove merged commit 6008d6c into robotframework:master Nov 1, 2023
6 of 9 checks passed
@emanlove emanlove deleted the update-atests-with-preconfigured-webdriver branch November 1, 2023 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant