Forum Discussion
Based on your response, I did try something along those lines. Since my scripts were correclty setting the drop down values, I left that alone. What I tried to do was call the function that the OnChange() event calls.
I tried this:
# Enter required fields & Save
Aliases.browser.page16438.form.selectBureauRegion.value = bureauRegionId;
curPage = Sys.Browser("*").Page("*")
curPage.contentDocument.Script.updateOffices()
It attempts to call the function direclty, but what I get is this:
I also tried it via eval as below:
# Enter required fields & Save
Aliases.browser.page16438.form.selectBureauRegion.value = bureauRegionId;
curPage = Sys.Browser("*").Page("*")
evalStr = "rootPath=\"" + ProjectSuite.Variables.ServerUrl + "/\"; updateOffices()"
# curPage.contentDocument.Script.eval(evalStr)
When I run this, the call to updateOffices() is apparently skipped. I did enough debugging to determine that this is correct. Occasionally, it will blow up instead.
In both cases, it does not appear to find the JavaScript function. Now, updateOffices() is defined is a .js file that the page loads as part of its operation.
Do I need to do something more for it to find the function?
From SmartBear support we got an answer that seems to be good enough.
In short, we switched from Chrome to Firefox for the browser for these test scripts. Using Click Item in Firefox is nearly as fast as the setting the .Value directly and the JSON is automatically triggered.
Related Content
- 2 years ago
Recent Discussions
- 2 days ago
- 2 days ago
- 5 days ago