- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2025 11:37 AM
In WashingtonDC version, and I created an ATF test to simply set value in a custom component and then perform submit action. However, I found the value wasn't set properly in now-input field. (see screenshots below)
For your note, manual test is working fine
Do you know how to solve this issue?
ATF test step using "Set Component Values (Custom UI)"
After debugging, I found value was not set properly in <now-input> element
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2025 10:57 AM
Hi @Shaqeel, I investigate into this issue. And I found "Set Component Values (Custom UI)" test step will run change & blur event, after setValue().
{
key: "afterSetValue",
value: function afterSetValue() {
if (this.skipAfterSetValue || !this.element) return;
var event = this.element.ownerDocument.createEvent("Event");
event.initEvent("change", true, false);
this.element.dispatchEvent(event);
if (this.version.sendFocusEventForSetValue()) this.element.blur();
}
}
However, in my custom component, I only set "Input input" and "Input enter keydown" to set form data. This issue is resolved after I create a new event handler "Input invalid set" to handle blur event.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2025 06:51 AM
Hi @KunningL
Can you share the result screenshot?
All looks good here.
Regards
Shaqeel
***********************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.
***********************************************************************************************************************
Regards
Shaqeel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2025 10:57 AM
Hi @Shaqeel, I investigate into this issue. And I found "Set Component Values (Custom UI)" test step will run change & blur event, after setValue().
{
key: "afterSetValue",
value: function afterSetValue() {
if (this.skipAfterSetValue || !this.element) return;
var event = this.element.ownerDocument.createEvent("Event");
event.initEvent("change", true, false);
this.element.dispatchEvent(event);
if (this.version.sendFocusEventForSetValue()) this.element.blur();
}
}
However, in my custom component, I only set "Input input" and "Input enter keydown" to set form data. This issue is resolved after I create a new event handler "Input invalid set" to handle blur event.