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

Select From Search Field #419

Merged
merged 7 commits into from
Sep 19, 2024
Merged

Conversation

Minasyan1
Copy link
Contributor

@Minasyan1 Minasyan1 commented Sep 11, 2024

This is a Selenium keyword that that first waits for an element to be on the DOM, executes
Focus on it, then it waits for it to be visible, clears it, and then inputs text.
Subsequently, it selects the first item in the search dropdown.

@coveralls
Copy link

coveralls commented Sep 12, 2024

Coverage Status

coverage: 100.0%. remained the same
when pulling eb5aad7 on Minasyan1:Minasyan1-patch-1
into d92413e on Accruent:master.

@Wolfe1
Copy link
Contributor

Wolfe1 commented Sep 12, 2024

Hey @Minasyan1,

A few items that I would start with before we can do a full review:

  • Make the name of the pull request more specific, this is the name that will be used when a release is cut by default.
  • We need to make sure that we maintain 100% unit test coverage. We will need one or more unit tests (Added to ~\test\GUI\test_gui.py) that cover the use case of this test:
    image
  • We also need to add a functional test for the keyword to ~test\GUI\GUITests.robot to demonstrate this keyword working on a public website. Eventually these will be merged but GUITestsEdge.robot as well so its included in the Edge functional tests.

def select_from_search_field(self, locator, text, timeout=None):
"""This is a Selenium keyword that first attempts to find a web element, clears it, and then inputs text.
Subsequently, it selects the first item in the search dropdown.
If typing into the element fails, the keyword will scroll to the bottom of the page and try again.
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it really do this? I don't get any indication from the code that this is the case.

@Minasyan1 Minasyan1 changed the title Adding a new keyword to GUILibrary.py Select From Search Field Sep 19, 2024
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think you need any of these anymore

@@ -6,6 +6,7 @@
from Zoomba.GUILibrary import GUILibrary
from Zoomba.Helpers import ReactSelect
from selenium.common.exceptions import UnexpectedTagNameException
from selenium.webdriver.common.keys import Keys
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, i don't think we need this anymore

Copy link
Contributor

@Wolfe1 Wolfe1 left a comment

Choose a reason for hiding this comment

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

Remove unused imports

@Wolfe1 Wolfe1 self-requested a review September 19, 2024 21:17
@Wolfe1 Wolfe1 merged commit 9cbb35c into Accruent:master Sep 19, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants