webdriverio-community / wdio-vscode-service

A service to test VSCode extensions from end to end using WebdriverIO
https://webdriverio-community.github.io/wdio-vscode-service/
MIT License
29 stars 23 forks source link

SettingsEditor functions don't appear to be working properly #127

Open petehale opened 2 weeks ago

petehale commented 2 weeks ago

I am trying to use the SettingsEditor returned from workbench.openSettings(), but subsequent function calls on the settings editor instance don't appear to be run against the open setting page.

This is the code I am using

  const settings: SettingsEditor = await workbench.openSettings();
  await settings.switchToPerspective('Workspace');
  const tab = await settings.getTab();
  await tab.select();

The call to switchToPerspective is failing with Can't call click on element with selector ".//a[@title='Workspace']" because element wasn't found.

I am also using the function await editor.findSetting(myTitle, myCategory); Observing the workspace, with settings open as well as Enabled Extensions, I can see the text for then find written into the search input area for EnabledExtensions.

Am I using the interfaces correctly?

peternhale commented 2 weeks ago

I think the selector being used in switchToPerspective is incorrect. With settings open, searching for .//a[@title='Workspace'] yields 0 while .//a[text()='Workspace'] yields 1.

christian-bromann commented 2 weeks ago

@petehale mind raising a PR for this?