Can't run custom JQuery
I am looking for ways around Named Mapping. I thought maybe I can get the elements I need to interact with via JQuery. At first I did this, to make sure that scripts are working: page.contentDocument.Script.eval("alert('testing')"); That runs fine (and shows the alert). I then tried: var originCode = page.contentDocument.Script.Eval("$('#OriginCode')"); Hoping to get the element I am looking for. But that gave me an error (very unhelpful error that says: Error 0x80020101 and file and line number to the line above). So then I tried this: var originCode = page.contentDocument.Script.$("#OriginCode"); From that I get a pop up error in Test Complete. It says: JavaScript runtime error. TypeError page.contentDocument.Script.$ is not a function But if I go to the console of my application and run $('#OriginCode') I get the JQuery object as a response. Any ideas of what I can do to get JQuery to work? Or any other ideas to work around Named Mapping? (If you want I can give a rant about how named mapping makes tests brittle and causes tons of work every time a slight change is made to the UI, but I will pass on that for now.)Solved1.4KViews0likes1Comment