playwright-ui5 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -11,14 +11,17 @@ npm install playwright-ui5
11
11
  ## usage
12
12
 
13
13
  ```ts
14
- import { selectors } from 'playwright'
14
+ import { selectors, test } from '@playwright/test'
15
15
  import ui5 from 'playwright-ui5'
16
16
 
17
- selectors.register('ui5', ui5)
18
- ;(async () => {
17
+ test.beforeAll(async () => {
18
+ await selectors.register('ui5', ui5)
19
+ })
20
+
21
+ test('ui5 example', ({ page }) => {
19
22
  await page.goto('https://ui5.sap.com/')
20
23
  await page.click("ui5=sap.m.Button[text='Get Started with UI5']")
21
- })()
24
+ })
22
25
  ```
23
26
 
24
27
  ## syntax
@@ -32,4 +35,4 @@ this selector engine uses css selector-like syntax. the main difference is that
32
35
  | attribute selectors | `[text]`, `[text='foo']`,`[text*='foo']` | ✔ | some equality mods are useless for ui5 (eg. `\|=`) but are supported for the sake of completeness |
33
36
  | id selectors | `sap.m.Button#foo` | ✔ | you should not use id selectors if the id is generated (eg. `__button1`) as they can change often |
34
37
  | nesting | `sap.m.Table sap.m.Button`,`sap.m.Table > sap.m.Button` | ❌ | use playwright selector nesting instead (`ui5=sap.m.Table >> ui5=sap.m.Button`) |
35
- | pseudo-classes | `sap.m.Table:has(sap.m.Button)` | ❌ |
38
+ | pseudo-classes | `sap.m.Table:has(sap.m.Button)` | ❌ | https://github.com/DetachHead/playwright-ui5/issues/12 |