-
Notifications
You must be signed in to change notification settings - Fork 30
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
fix: locator selection and outputChannel selector #138
fix: locator selection and outputChannel selector #138
Conversation
jan872
commented
Sep 23, 2024
The locator selection by vscode version did not work, because the vscode version was overwritten by the underlying chrome version and "122" was larger than all vscode versions. The vscode version is now preserved and use for locator selection. As of vscode 1.87.0 the bottombar's outputChanel selector does not have an attribute title anymore. The locator for 1.87.0 was thus added.
@@ -87,7 +87,8 @@ export default class VSCodeServiceLauncher { | |||
} | |||
|
|||
const version = cap[VSCODE_CAPABILITY_KEY].version || cap.browserVersion || DEFAULT_CHANNEL | |||
|
|||
cap[VSCODE_CAPABILITY_KEY].version = version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version
is not a valid capability. What is the idea behind this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From line 89 I assumed that version was a valid capability, as it was used there.
The idea was to store the actual vscode version before cap.browserVersion
gets overwritten here: https://github.com/webdriverio-community/wdio-vscode-service/blob/main/src/launcher.ts#L174
such that it is available here for selection of the right locators:
https://github.com/webdriverio-community/wdio-vscode-service/blob/main/src/service.ts#L207
(see https://github.com/webdriverio-community/wdio-vscode-service/pull/138/files#diff-84b68bce2abfcb25c3328df0286963d7dacc924940adc41923bf4f502a6bc95aR206)
Currently the capabilities.browserVersion
is overwritten to the chrome version, and the locators may thus not be selected correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jan872 actually this is correct, it is just changing the VSCODE_CAPABILITY_KEY
capability object which can have arbitrary content.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
1429340
into
webdriverio-community:main
Hey jan872 👋 Thank you for your contribution to WebdriverIO! Your pull request has been marked as an "Expensable" contribution. We've sent you an email with further instructions on how to claim your expenses from our development fund. We are looking forward to more contributions from you in the future 🙌 Have a nice day, |