-
-
Notifications
You must be signed in to change notification settings - Fork 736
UnhandledPromiseRejectionWarning error when selecting the dropdown using "selectOption" #295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I am having the same problem. Previously it works fine with Webdriverio and phantomjs but after using nightmare, not working in that as well. |
Could you provide HTML which reproduces this error? Also what helper is that? Nightmare or webriverio? |
Im using nightmare & node version 6.9.1 The HTML is - <form name="ContactUsForm">
<p class="required"><span>*</span> = required</p>
<fieldset repeat="content.form.fieldsets" name="messageInfo">
<legend if="legend">Message</legend>`
<div each="fields" template="">`
<label class=" ">
<span>Subject</span>
<input type="text" data-which-field="" name="contact_subject" value="" maxlength="100" class="valid">
</label>
<label class=" ">
<span>Message Text</span>
<textarea name="customer:comments" wrap="" maxlength="2000"></textarea>
</label>
</div>
</fieldset>
<fieldset repeat="content.form.fieldsets" name="contactInfo">
<legend if="legend">Contact Information</legend>
<div each="fields" template="">
<label class=" required ">
<span>First Name</span>
<input type="text" data-which-field="" name="contact:name:first" value="" maxlength="100" required="">
</label>
<label class=" required ">
<span>Last Name</span>
<input type="text" data-which-field="" name="contact:name:last" value="" maxlength="100" required="">
</label>
<label class="required ">
<span if="label">Preferred Contact</span>
<select name="preferred_contact" data-which-field="" required="" fieldtype="">
<option value="email" repeat="values">Email</option>
<option value="day" repeat="values">Phone</option>
</select>
</label>
</div>
</fieldset>
<fieldset repeat="content.form.fieldsets" name="default_section">
<div each="fields" template=""><!-- Revisit what honeypot is, hidden at the moment -->
<input aria-hidden="true" type="text" name="hp:contact:cmpny:phone" value=""><!--^_^--><input type="hidden" name="cellName" value="contact_us"><!--^_^--><input type="hidden" name="pageName" value="ContactUsForm"><!--^_^--><input type="hidden" name="outputType" value="json"><input type="hidden" name="widgetType" value="emailforms"><!--^_^--><input type="hidden" name="widgetName" value="contactUs_widget"><!--^_^--><input type="hidden" name="productId" value="46.110.00"><!--^_^--><input type="hidden" name="widgetContext" value=""><!--^_^--><input type="hidden" name="source" value="">
</div>
</fieldset>
<div role="status" id="search-view/card/7ecd6bc1-926e-4688-902e-13965f514926-status" aria-hidden="true">
</div>
<div if="content.form.buttons" template="button" each="content.form.buttons">
<button type="submit" name="" id="" data-action="formSubmit">Submit</button>
</div>
</form> |
For normal html dropdown it is working fine but I am using the semantic ui dropdown so it is throwing error on that part. |
I'm using a normal html |
Looks like we have 2 cases here. I can work only with that one with an example. |
<form name="ContactUsForm">
<p class="required"><span>*</span> = required</p>
<fieldset repeat="content.form.fieldsets" name="messageInfo">
<legend if="legend">Message</legend>`
<div each="fields" template="">`
<label class=" ">
<span>Subject</span>
<input type="text" data-which-field="" name="contact_subject" value="" maxlength="100" class="valid">
</label>
<label class=" ">
<span>Message Text</span>
<textarea name="customer:comments" wrap="" maxlength="2000"></textarea>
</label>
</div>
</fieldset>
<fieldset repeat="content.form.fieldsets" name="contactInfo">
<legend if="legend">Contact Information</legend>
<div each="fields" template="">
<label class=" required ">
<span>First Name</span>
<input type="text" data-which-field="" name="contact:name:first" value="" maxlength="100" required="">
</label>
<label class=" required ">
<span>Last Name</span>
<input type="text" data-which-field="" name="contact:name:last" value="" maxlength="100" required="">
</label>
<label class="required ">
<span if="label">Preferred Contact</span>
<select name="preferred_contact" data-which-field="" required="" fieldtype="">
<option value="email" repeat="values">Email</option>
<option value="day" repeat="values">Phone</option>
</select>
</label>
</div>
</fieldset>
<fieldset repeat="content.form.fieldsets" name="default_section">
<div each="fields" template=""><!-- Revisit what honeypot is, hidden at the moment -->
<input aria-hidden="true" type="text" name="hp:contact:cmpny:phone" value=""><!--^_^--><input type="hidden" name="cellName" value="contact_us"><!--^_^--><input type="hidden" name="pageName" value="ContactUsForm"><!--^_^--><input type="hidden" name="outputType" value="json"><input type="hidden" name="widgetType" value="emailforms"><!--^_^--><input type="hidden" name="widgetName" value="contactUs_widget"><!--^_^--><input type="hidden" name="productId" value="46.110.00"><!--^_^--><input type="hidden" name="widgetContext" value=""><!--^_^--><input type="hidden" name="source" value="">
</div>
</fieldset>
<div role="status" id="search-view/card/7ecd6bc1-926e-4688-902e-13965f514926-status" aria-hidden="true">
</div>
<div if="content.form.buttons" template="button" each="content.form.buttons">
<button type="submit" name="" id="" data-action="formSubmit">Submit</button>
</div>
</form> |
@sushan088 - Did you try using I.fillField(,) instead of I.selectOption(,)? @DavertMik Btw, this issue happens only when I use the I.selectOption which in turns changes the DOM (ajax). |
@sushan088 - Did you try using I.fillField(,) instead of I.selectOption(,)? @DavertMik Btw, this issue happens only when we use the I.selectOption which in turns changes the DOM (ajax). |
|
@magimenon thanxs it worked, it is troubling me so much now it is fixed thanx. |
I hope it is fixed by @robrkerr |
What are you trying to achieve?
I'm trying to select an option from the dropdown. Name of my is "search" and I select a value "new". I get a below error: UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Failed to execute 'iterateNext' on 'XPathResult': The document has mutated since the result was returned. One thing to be noted here is when I select the first dropdown there are other dropdown gets populated (ajax). I googled and couldn't figure out what's going wrong here? What do you get instead? UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Failed to execute 'iterateNext' on 'XPathResult': The document has mutated since the result was returned.
The text was updated successfully, but these errors were encountered: