Forum Discussion
Let's see if the Community has suggestions!
Any ideas ApplePen anupamchampati tphillips ?
- tphillips4 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.
- AlexKaras4 years agoChampion Level 3
sonya_m :
Sonya,
There was fantastic https://support.smartbear.com/articles/testcomplete/embedding-scripts-into-web-pages/ article on your site that along with the https://support.smartbear.com/testcomplete/docs/app-testing/web/common-tasks/javascript.html documentation should provide solution to Dan.
Unfortunately, this article seems to be renamed or removed from the site. Could you please talk to your guys and ask them to return the article back?
P.S. I believe that the mentioned article can be used for another question by Dan asked here: https://community.smartbear.com/t5/TestComplete-Functional-Web/get-elements-from-DOM-not-page-source/td-p/219054 (even despite the fact that Dan already found solution with the help of his development team).
- sonya_m4 years agoSmartBear Alumni (Retired)
Thank you, AlexKaras ! Looks like this article is under the revision of the Support Team same as what we talked about here.
I would suggest, that you go to the Support directly, this way you'll get a quicker and direct response, also, feel free to talk to them about things you feel that should be mentioned in these articles - we value your opinion!
- AlexKaras4 years agoChampion Level 3
sonya_m :
Yes, this is the document I was talking about. Thank you a lot, Sonya for the link to the thread!
Dan, I would recommend to go through the thread referenced by Sonya and download the document she attached to one of her replies there. I believe that it should be useful and might inspire you with ideas.
Related Content
- 6 years ago
- 13 years ago
- 2 years ago
Recent Discussions
- 3 days ago
- 3 days ago
- 6 days ago