Forum Discussion
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.
Hmm, that's giving me a "type mismatch" at position 10 which is the start of .addEventListener
- tphillips3 years agoFrequent Contributor
You might need to play around with the page variable, you might have to remove the .contentDocument part when assigning it:
var page = browser.Page("*");
- geneticmaterial3 years agoContributor
I have now implemented:
function captureEventDetails() { var browser = Sys.Browser("*") var page = browser.Page("*") page.addEventListener("form_field_complete", function (e) { Log.Alert('Adobe event '.concat(e.type)); Log.Alert(e.detail); }); }
but this now hangs while it looks for it then returns:
"Unable to find the object addEventListener("form_field_complete", null). See Details for additional information..."
The event listeners are running on the page and the event has been triggered.
I have tried to run this before and after triggering the event on the page (entering text and moving away from a text box).
for eg:
Related Content
Recent Discussions
- 2 days agovladd1