Skip to content

Commit

Permalink
locators updated (#75)
Browse files Browse the repository at this point in the history
### To be filled by the PR creator:

* A brief description of the changes made - 

* Do we have clean latest run report (Docker or Browserstack) attached
with this PR?
  * [ ] Yes
  * [ ] No (Please explain why)

* Does the PR contain changes to any core file?
  * [ ] Yes (Needs approval from at least 1 people)
  * [ ] No

* Is it
  * [ ] New Testcase
  * [ ] Fix


### To be filled by the PR reviewer:

* [ ] Verify the attached run report passed in GitHub Actions (Docker or
Browserstack run)

* General
    * [ ] Use the best strategy to locate the elements
    * [ ] Comments wherever the code is not readable by itself
    * [ ] Use of the right data structure for the use case
    * [ ] Reuse logic/functionality as much as possible
    * [ ] Cleanup of any test data that is generated by the tests
    * [ ] No static waits
  • Loading branch information
Tauqir Sarwar authored Mar 28, 2024
2 parents 7c8d530 + a49c383 commit 2ac62f6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,14 @@ Notifications
--teams-webhook-url=https://moduscreate.webhook.office.com/...
--teams-results-url=http://localhost:63342/pytest-automation-boilerplate/output/allure/reports/index.html
** Local web driver warnings (if any) resolution for Safari browser on mac**
```shell
/usr/bin/safaridriver --enable
```
For chrome webdriver warning (if any):
```shell
xattr -d com.apple.quarantine $(which chromedriver)
```
Boilerplate update
Expand Down
3 changes: 1 addition & 2 deletions frontend/test_project/features/web/login_tests.feature
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ Feature: OrangeHRM Login and Modus QA blog
When The element 'Modus_Site > main_heading' is displayed
And I click item 'Careers' for element 'Modus_Site > header_link'
And The title is 'Modus Create - Careers | Digital Transformation Consultants'
And The element 'Modus_Site > Careers > dropdown_filter' is displayed
And I move to element 'Modus_Site > Careers > dropdown_filter'
And The element 'Modus_Site > Careers > dropdown_area' is displayed
And I select the option 'Global' by value for element 'Modus_Site > Careers > dropdown_filter'
And I click item 'Android Engineer' for element 'Modus_Site > Careers > job_title'
Then The page url contains '4325051003'
Expand Down
1 change: 1 addition & 0 deletions frontend/test_project/locators/Web_locators.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"sub_popup_close": "//button[@class='leadinModal-close']",
"modus_logo": "//a[@itemprop='url']//div[@class='modus-logo modus-logo-spin']",
"Careers": {
"dropdown_area": "//div[@class='filterSeach']",
"dropdown_filter": "//label[text()='Offices']/select",
"main_iframe": "//iframe[@id='grnhse_iframe']",
"job_title": "//h2[@class='job-title']/a[contains(text(),'{}')]",
Expand Down
3 changes: 0 additions & 3 deletions main/frontend/common/step_definitions/browser_navigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,15 +343,13 @@ def switch_to_iframe(selenium_generics: SeleniumGenerics, locators: Locators, lo


# WEB context Predefined Step
# ID 129
@given(parsers.re("I switch back from iframe"))
@when(parsers.re("I switch back from iframe"))
def switch_back_from_iframe(selenium_generics: SeleniumGenerics):
selenium_generics.switch_context_to_default_content()


# WEB context Predefined Step
# ID 130
@given(parsers.re("I take a screenshot"))
@when(parsers.re("I take a screenshot"))
@then(parsers.re("I take a screenshot"))
Expand All @@ -361,7 +359,6 @@ def take_a_screenshot(selenium_generics: SeleniumGenerics):


# WEB context Predefined Step
# ID 131
@given(parsers.re("I '(?P<cache_option>disable|enable)' the cache"))
@when(parsers.re("I '(?P<cache_option>disable|enable)' the cache"))
def disable_cache(driver, cache_option: str):
Expand Down

0 comments on commit 2ac62f6

Please sign in to comment.