-
Notifications
You must be signed in to change notification settings - Fork 0
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
Selenium Tests #162
base: master
Are you sure you want to change the base?
Selenium Tests #162
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few comments:
- some xpaths are a bit too specific and will break easily if we change anything in the layout, so it's generally better to find a unique element (e.g. because of a class/id) near the one you want and then go from there, instead of starting from the root;
- there are some wait/sleep that look a bit fragile: if the server takes longer the test will timeout and fail, if it takes less time it will wait for nothing. If possible it would be better to wait for the next page load (if selenium has such event) or possibly polling every few seconds.
- there were a few style issues (e.g. lines too long, some spacing, string concatenation instead of f-string)
P.S.: using 3.10+ features is fine with me.
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
======= | ||
driver.find_element(By.ID, 'guest-login').click() | ||
|
||
>>>>>>> Stashed changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that some merge markers were accidentally committed (probably after a merge).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commit after this one fixed this I believe.
This is the first commit for adding Selenium tests to the front end. This test runs the SAM preset with a custom day count and process count sent by the user through cli args.
This version currently only supports Chrome and is using some Python 3.10+ only features, i.e.
match
case for the initial compare. This can be changed to if else statements to not break any compatibility with older versions. It is a rudimentary implementation ofmatch
and can be easily expanding upon.Work for adding Firefox and Edge support are next.