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

webdriverio: fix appium getvalue #3606

Merged
merged 1 commit into from
Feb 26, 2019
Merged

webdriverio: fix appium getvalue #3606

merged 1 commit into from
Feb 26, 2019

Conversation

mgrybyk
Copy link
Member

@mgrybyk mgrybyk commented Feb 22, 2019

Proposed changes

fix #3515
use non W3C method to getValue

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

most likely we have to submit ticket to Appium if there are no such
iOS

session/{sessionId}/element/5000/property/value
Method has not yet been implemented

Android

404 - "unknown command: 
session/{sessionId}/element/0.12642389298468348-1/property/value"

Reviewers: @webdriverio/technical-committee

@codecov
Copy link

codecov bot commented Feb 22, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@3fe38b5). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #3606   +/-   ##
=========================================
  Coverage          ?   98.79%           
=========================================
  Files             ?      141           
  Lines             ?     3075           
  Branches          ?      672           
=========================================
  Hits              ?     3038           
  Misses            ?       35           
  Partials          ?        2
Impacted Files Coverage Δ
...kages/webdriverio/src/commands/element/getValue.js 100% <100%> (ø)

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 3fe38b5...823654e. Read the comment docs.

@@ -33,4 +33,18 @@ describe('getValue', () => {
await elem.getValue()
expect(request.mock.calls[2][0].uri.path).toBe('/wd/hub/session/foobar-123/element/some-elem-123/attribute/value')
})

it('should get value in mobile mode', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this test fail if you remove your fix for .getValue()?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes

Copy link
Member

Choose a reason for hiding this comment

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

but how? it does the same assertion as in line 34, no?

Copy link
Member Author

@mgrybyk mgrybyk Feb 22, 2019

Choose a reason for hiding this comment

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

@christian-bromann assertion is the same, thats correct.
However capabilities are different

            capabilities: {
                browserName: 'foobar', // isW3C => true
                mobileMode: true // isMobile => true
            }

I'm creating instance in W3C and mobile mode: mobileMode: true

    if (this.isMobile) { // true, thats why test is passing currently
    if (this.isW3C) { // true, thats why test will fail if I remove the fix

We won't get to https://github.com/webdriverio/webdriverio/pull/3606/files/27f20ac559ca818b73cf5905012e3b099e59e6e4#diff-0aa25083832529e9bf1df741e54bd36aR34

Copy link
Member

Choose a reason for hiding this comment

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

ahh ok no I see once expand the whole file. Let's do

if (this.isW3C && !this.isMobile) {

then please. I am also wondering if this shouldn't be a bug reported in Appium.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, I'll update condition.

It should be either reported to Appium or if it is working as designed we need a link to prove that.
I'll take a look on Monday

@@ -33,4 +33,18 @@ describe('getValue', () => {
await elem.getValue()
expect(request.mock.calls[2][0].uri.path).toBe('/wd/hub/session/foobar-123/element/some-elem-123/attribute/value')
})

it('should get value in mobile mode', async () => {
Copy link
Member

Choose a reason for hiding this comment

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

but how? it does the same assertion as in line 34, no?

@christian-bromann
Copy link
Member

Appium issue logged at appium/appium#12218

@mgrybyk
Copy link
Member Author

mgrybyk commented Feb 25, 2019

@christian-bromann thanks a lot for help!

Updating PR right now according to requested changes

@christian-bromann
Copy link
Member

@mgrybyk don't see the change applied, did you miss to push it?

@mgrybyk
Copy link
Member Author

mgrybyk commented Feb 25, 2019

Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

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

Ah no I see it , thanks 👍

@christian-bromann
Copy link
Member

Let's wait until the highlight.js bug is fixed, I will rerun and merge then

@mgrybyk mgrybyk closed this Feb 26, 2019
@mgrybyk mgrybyk reopened this Feb 26, 2019
@christian-bromann christian-bromann added the PR: Bug Fix 🐛 PRs that contain bug fixes label Feb 26, 2019
@christian-bromann christian-bromann merged commit 9806c05 into webdriverio:master Feb 26, 2019
@mgrybyk mgrybyk deleted the appium-getvalue branch March 27, 2019 13:28
yamkay pushed a commit to MoveInc/webdriverio that referenced this pull request Sep 4, 2019
## Proposed changes

fix webdriverio#3515
use non W3C method to getValue

## Types of changes

- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

## Checklist

- [x] I have read the [CONTRIBUTING](https://github.com/webdriverio/webdriverio/blob/master/CONTRIBUTING.md) doc
- [x] I have added tests that prove my fix is effective or that my feature works
- [ ] I have added necessary documentation (if appropriate)

## Further comments

most likely we have to submit ticket to Appium if there are no such
iOS
```
session/{sessionId}/element/5000/property/value
Method has not yet been implemented
```
Android
```
404 - "unknown command: 
session/{sessionId}/element/0.12642389298468348-1/property/value"
```

### Reviewers: @webdriverio/technical-committee
@christian-bromann
Copy link
Member

The bug for this PR was merged and released. I am not sure which issue your are referring to here.

@ckzgraphics
Copy link

@christian-bromann - I was facing the error 'Method has not yet been implemented' for 'getProperty' command with WebDriverIO + Appium. Hence wanted to verify. Thank you for the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Bug Fix 🐛 PRs that contain bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue with getValue() and Appium on iOS - 'Method has not yet been implemented'
4 participants