Forum Discussion
sonya_m
SmartBear Alumni (Retired)
Let's see if the Community has suggestions!
Any ideas ApplePen anupamchampati tphillips ?
tphillips
4 years agoFrequent Contributor
You can't call TestComplete functions from events on web pages. It has to be a function the browser understands (e.g. an Alert), which TestComplete could then capture
- geneticmaterial4 years agoContributor
Thanks for your response. Could you expand on this a little for me? Maybe an example?
- tphillips4 years agoFrequent Contributor
Try changing your calls to Log.Message() to alert() calls (which the browser supports)
You can then capture the alert window using TestComplete and check the text in the alert.
function Test() { var browser = Sys.Browser("*"); var page = browser.Page("*").contentDocument; page.addEventListener("form_field_complete", function (e) { alert('Adobe event '.concat(e.type)); alert(e.detail); }); }
If you don't get any alerts, you know that your event isn't firing properly.
- geneticmaterial4 years agoContributor
Hmm, that's giving me a "type mismatch" at position 10 which is the start of .addEventListener
Related Content
- 6 years ago
- 13 years ago
- 2 years ago
Recent Discussions
- 8 hours ago