Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Fix: Unable to locate element error #1065 #1126

Closed
wants to merge 21 commits into from
Closed

Fix: Unable to locate element error #1065 #1126

wants to merge 21 commits into from

Conversation

sanjibansg
Copy link

@sanjibansg sanjibansg commented Sep 23, 2020

Description

Added the necessary Selenium explicit and implicit waits for automating the process without Travis CI failing for not locating elements.

Fixes #1065

Type of Change:

  • Code

Code/Quality Assurance Only

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

All the Travis CI Checks passed after updating the code file.

Checklist:

  • My PR follows the style guidelines of this project
  • I have performed a self-review of my own code or materials
  • Any dependent changes have been merged

Code/Quality Assurance Only

  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

@codecov
Copy link

codecov bot commented Sep 23, 2020

Codecov Report

Merging #1126 into develop will decrease coverage by 0.09%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1126      +/-   ##
===========================================
- Coverage    87.30%   87.20%   -0.10%     
===========================================
  Files           85       85              
  Lines         4057     4057              
  Branches       237      237              
===========================================
- Hits          3542     3538       -4     
- Misses         445      448       +3     
- Partials        70       71       +1     
Impacted Files Coverage Δ
vms/event/views.py 77.63% <0.00%> (-1.69%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f8a4ea7...9fde553. Read the comment docs.

@sanjibansg sanjibansg changed the title Initial PR fixing #1065 updating test_formFields.py Initial PR fixes #1065 updating test_formFields.py Sep 24, 2020
Copy link
Contributor

@satya7289 satya7289 left a comment

Choose a reason for hiding this comment

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

Also, follow the commit message guidelines.

@@ -73,11 +73,35 @@ def check_event_form_values(self, event):
:param event: Iterable consisting values for events.
"""
settings = self.settings
try:
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of having this method multiple times, can you make a separate method and call this method everywhere.

@sanjibansg sanjibansg changed the title Initial PR fixes #1065 updating test_formFields.py Fix: Unable to locate element error #1065 Sep 25, 2020
@sanjibansg
Copy link
Author

@satya7289 Changes made as per asked, Do have a look.

Copy link
Contributor

@satya7289 satya7289 left a comment

Choose a reason for hiding this comment

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

Also, please remove extra lines from the changed code.

@@ -87,12 +105,17 @@ def check_job_form_values(self, job):
:param job: Iterable consisting values for job.
"""
settings = self.settings
self.driver.implicitly_wait(8)
Copy link
Contributor

Choose a reason for hiding this comment

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

Put implicit wait time as a variable(instead of hardcoded time value).

Copy link
Author

@sanjibansg sanjibansg Sep 28, 2020

Choose a reason for hiding this comment

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

Shall I make a single global time variable to do the work for all the implicit waits? @satya7289

Copy link
Contributor

@satya7289 satya7289 Sep 29, 2020

Choose a reason for hiding this comment

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

Yes, Also squash multiples commit to a single commit by following the commit message guildlines.

@sanjibansg
Copy link
Author

Also, please remove extra lines from the changed code.

Closing this PR due to some problems, opened PR #1150 for solving the issue, do review that.

@sanjibansg sanjibansg closed this Oct 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix the unable to locate element error
2 participants