ui5-community / wdi5

official UI5 end-to-end test framework for UI5 web-apps. wdi5 = Webdriver.IO + UI5 Test API
https://ui5-community.github.io/wdi5/
Apache License 2.0
102 stars 43 forks source link

Table.selectAll is not a function #336

Closed ZhanJohnny closed 2 years ago

ZhanJohnny commented 2 years ago

Describe the bug After geting the table object using browser.asControl(), the table is a UI table. In UI5 API, there is a selectAll method , but when try to call table.selectAll() method in WDI5, it show below error message: TypeError: oTable.selectAll is not a function Checkbox of selectAll in table UI is invisible , So i had to use selectAll method.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Logs/Console Output if applicable, please copypasta code-fenced log output, e.g.

$> ...

Screenshots if applicable, add screenshots to help explain your problem.

Runtime Env (please complete the following information):

Additional context Add any other context about the problem here, e.g. any options the target browser is started with like --headless or if the tests run in a CI environment

vobu commented 2 years ago

Hi, could you please fill in the additional info that is asked for in the template. It makes tracking down things easier. Thanks in advance!

vobu commented 2 years ago

even though you provided no additional information, I coded a minimal reproducible sample:

(typescript)

const table: Table = await browser.asControl({
      selector: {
          id: "sap.m.Table",
          viewName: "test.Sample.tsapp.view.Main",
          interaction: "root"
      }
  })
  await table.selectAll() // <-- works just fine

After locating the sap.m.Table successfully, selectAll() works as intended in wdi5. So I suspect you're control locator didn't work, so subsequently, selectAll() can't be called.