As part of my nightwatchjs test script, I would like to change the value of an element on the page in order to stop a pop-up from appearing on a subsequent page.
The html is as below;
div id="newsletterSignup" class="newsletter-signup" data-page-view-threshold="3" style="display: block;"
So in this instance, on the 3rd visited page, the Newsletter popup would appear.
However, I don't want this popup to appear, so my idea was to change the data-page-view-threshold="3" value from 3 to 50.
This way, my test script would finish before 50 pages were visited and the popup would not be displayed.
However, when I tried using the getValue command in Nightwatch on the element #newsletterSignup[data-page-view-threshold], it returned the value as null.
Hence, using setValue command didn't work, as the current setting of 3 doesn't seem to be an actual value.
Is there more complicated that I was hoping, or am I missing something obvious somewhere?
Any help in this would be greatly appreciated.