In Our App [WebView hybrid iOS/Android APP]-
We have few validations triggered at onblur/onfoucsout event at inputbox like -
1. Remove spaces from the textbox value
2. Remove some special character if they are in string(text box value)
3. etc..
but when i set the value using SetAttributeValue("value", "textboxstring") the above validations are not triggered at onfocustout or onblur events.
for event raising i raised events with invokeAction("onblur")
I tried element.PressKeys() to set value for inputbox but got exception like this method not supported in webview inputbox.
Any help is appreciated.
Mobile WebView App - TextBox validation problem
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: Mobile WebView App - TextBox validation problem
Hi Rancho,
Unfortunately, the onblur event is not fired automatically when using setValue on a textbox. To trigger the desired event manually, you can try using the following workaround
Regards,
Markus (S)
Unfortunately, the onblur event is not fired automatically when using setValue on a textbox. To trigger the desired event manually, you can try using the following workaround
dom.ExecuteScript("$(\"#TEXTBOX_ID\").change();");Please do let me know if this solves your problem.
Regards,
Markus (S)