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

Added errors to ClickX methods and added existence check #341

Merged
merged 3 commits into from
Jul 26, 2019

Conversation

ziflex
Copy link
Member

@ziflex ziflex commented Jul 25, 2019

In 0.7 CLICK and CLICK_ALL was doing a check before clicking and was returning a boolean value indicating whether a target element was clicked.
In 0.8 this logic got broken and the check is not performed.

@ziflex ziflex added type/bug Something isn't working area/stdlib Standard library issue area/drivers/cdp Cdp driver area/drivers/http Http driver area/drivers HTML drivers labels Jul 25, 2019
@codecov
Copy link

codecov bot commented Jul 25, 2019

Codecov Report

Merging #341 into master will decrease coverage by <.1%.
The diff coverage is 0%.

@@           Coverage Diff            @@
##           master    #341     +/-   ##
========================================
- Coverage    39.9%   39.9%   -<.1%     
========================================
  Files         218     218             
  Lines        8619    8608     -11     
========================================
- Hits         3441    3434      -7     
+ Misses       4825    4821      -4     
  Partials      353     353

@ziflex ziflex requested a review from 3timeslazy July 25, 2019 23:54
exists, err := i.document.ExistsBySelector(ctx, i.selector)

if err != nil {
return values.ZeroInt, values.ZeroInt, err
Copy link
Member

Choose a reason for hiding this comment

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

Maybe return values.None instead values.ZeroInt?

Copy link
Member Author

Choose a reason for hiding this comment

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

It does not really matter, since an execution gets terminated because of the returned error.

Copy link
Member

@3timeslazy 3timeslazy Jul 26, 2019

Choose a reason for hiding this comment

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

To be consistent I'm suggest to return values.None every time error occurred.

@ziflex ziflex merged commit b323a98 into master Jul 26, 2019
@ziflex ziflex deleted the bugfix/click-check branch July 27, 2019 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/drivers/cdp Cdp driver area/drivers/http Http driver area/drivers HTML drivers area/stdlib Standard library issue type/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants