redhat-developer / vscode-extension-tester

ExTester: Your Essential UI Testing Companion for Visual Studio Code Extensions! Seamlessly execute UI tests with Selenium WebDriver, ensuring robustness and reliability in your extension development journey. Simplify UI testing for your VS Code extensions and elevate the quality of your user interface effortlessly.
Apache License 2.0
243 stars 67 forks source link

[🚫 Bug] Can not getAction for View Section when another action button is disabled #1303

Open LareinaJi opened 1 month ago

LareinaJi commented 1 month ago

Describe the bug

Hi, team, I want to click the action "Refresh" in the viewSection as following pic, but section.getAction('Refresh') does not work. the reason is another button "Collapse All" is grey(disabled) (there is no items in the view, so it's disabled), then ViewSection.getActions will never return. you can see the function getActions in the file component/sidebar/ViewSection.js

   for (const element of elements) {
            actions.push(await new ViewPanelAction(element, this).wait());
        }

viewSection_actions

Steps to reproduce

const action = await section.getAction('Refresh');
    await action.click();

Logs

TimeoutError: Waiting until element is enabled
Wait timed out after 1091ms
      at C:\Data\repo\devstudio\node_modules\selenium-webdriver\lib\webdriver.js:911:22
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Operating System

Windows 11

Visual Studio Code

1.89.1

vscode-extension-tester

8.2.0

NodeJS

18.15.0

npm

9.5.0