Skip to content

Commit c5f3d8a

Browse files
committed
Fix the parent element example in the XPath section
`..` doesn't appear to work any more. See webdriverio/webdriverio#13652
1 parent c2429ff commit c5f3d8a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

selectors/example.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ describe('selectors', () => {
8080
const paragraph = await $('//body/p[2]')
8181
await expect(paragraph).toHaveText('barfoo')
8282

83-
// const parent = await paragraph.$('..')
84-
// expect(await parent.getTagName()).toBe('body')
83+
const parent = await paragraph.parentElement();
84+
expect(await parent.getTagName()).toBe('body')
8585
})
8686

8787
describe('aria', () => {

0 commit comments

Comments
 (0)