Replies: 1 comment 3 replies
-
Ok an update for anyone else that passes through. Sections are very misleading. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all
I would like some clarification about the documentaiton for Nightwatch 1.7.x:
https://v17.nightwatchjs.org/guide/working-with-page-objects/defining-sections.html
Specifically, "Provide element-level nesting so that any element defined within a section is a descendant of its parent section in the DOM"
Question
If I create a section and include sub sections, how are the subsections locations interpreted?
For example:
if the section named "database" with locator in css is
table
has subsection "entry" locator in css is
thead
then will Nightwatch use
table thead
(general descendant) ortable>thead
(direct descendant)when I do for example
database.assert.visible(entry);
?I am guessing it treats it as a general descendant, is there a way to force it to be direct if that is the case?
Furthermore, does this treat xpath similarly?
I've added a code example below for reference:
Beta Was this translation helpful? Give feedback.
All reactions