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 login.py #83

Merged
merged 1 commit into from
Feb 29, 2024
Merged

Update login.py #83

merged 1 commit into from
Feb 29, 2024

Conversation

TheAntic
Copy link

Fixes for entering email and password

Fixes for entering email and password
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Type: Enhancement

PR Summary: The pull request introduces enhancements to the login functionality within the application, specifically targeting the mechanisms for entering email and password. It modifies the element identification for better visibility checks and introduces a retry mechanism for inputting the email and password, ensuring the correct values are entered before proceeding.

Decision: Comment

📝 Type: 'Enhancement' - not supported yet.
  • Sourcery currently only approves 'Typo fix' PRs.
✅ Issue addressed: this change correctly addresses the issue or implements the desired feature.
No details provided.
✅ Small diff: the diff is small enough to approve with confidence.
No details provided.

General suggestions:

  • Consider adding a comment or documentation regarding the change of element ID from 'loginHeader' to 'i0116' to provide context for this change, especially if such IDs are subject to frequent updates.
  • Review the use of fixed time delays (e.g., time.sleep(3)) in the login process. While they may serve as a workaround for certain synchronization issues, they could introduce unnecessary delays or flakiness in the login process. Exploring more dynamic waiting strategies or conditions could enhance the robustness and efficiency of the login mechanism.
  • Ensure that the retry mechanism for entering the email and password does not inadvertently lead to an infinite loop under certain conditions. Implementing a maximum retry limit could safeguard against such scenarios.

Thanks for using Sourcery. We offer it for free for open source projects and would be very grateful if you could help us grow. If you like it, would you consider sharing Sourcery on your favourite social media? ✨

Share Sourcery

Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@@ -29,7 +29,7 @@ def login(self):
break
except Exception: # pylint: disable=broad-except
try:
self.utils.waitUntilVisible(By.ID, "loginHeader", 0.1)
self.utils.waitUntilVisible(By.ID, "i0116", 10)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (llm): Changing the ID from "loginHeader" to "i0116" suggests a significant change in the login element's identification. It's good practice to document such changes either in the code comments or commit message for future reference, especially if this ID is prone to change.

Copy link

@paul0665 paul0665 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

work well

Copy link

@bandrea83 bandrea83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it worked for me

@klept0 klept0 merged commit bb037e9 into klept0:master Feb 29, 2024
3 checks passed
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.

4 participants