Hello,
Is there any possibility in CodeceptJS wherein we could wait, maybe through waitForText() or wait() for an element attribute such as "placeholder" to have some sort of value.
==========
Example:
I have a combobox with the following HTML when the page was first loaded:
<input type="text" placeholder="Loading..." value="" id="namelist_combobox" name="">
after x seconds (data was successfully loaded from DB), the placeholder attribute is changed to:
<input type="text" placeholder="What do you want to search for" value="" id="namelist_combobox" name="">
==========
Is it possible to do:
I.waitForValue('//*[@id="namelist_combobox"][placeholder]','What do you want to search for', 5);
or
I.waitForAttributeValue('#namelist_combobox', 'What do you want to search for', 5);
Thanks in advance.
Try the waitForVisible via the selector "input[placeholder='What do you want to search for']" as below:
I.waitForVisible("input[placeholder='What do you want to search for']",30);
==> It the dynamic wait until possible to see that placeholder='What do you want to search for'] in input element, if ok it'll do next action code ...
Closing issue due to inactivity after a suggested solution.
Most helpful comment
Try the waitForVisible via the selector "input[placeholder='What do you want to search for']" as below:
I.waitForVisible("input[placeholder='What do you want to search for']",30);
==> It the dynamic wait until possible to see that placeholder='What do you want to search for'] in input element, if ok it'll do next action code ...