Hello,
I am trying to run Canoo Webtest groovy script with an Oracle BI user
interface. I have been successful in logging in, clicking on links etc.
However I am trying to select an option from a dropdown and click on the
"Go" button. This select tag has an onchange event that calls some js
functions. When I run the groovy webtest it seems to fail on the select call
and complains that it cannot find createElement. That seems like a simple
DOM function. Am I missing something or does Webtest currently not support
java script properly?
Here is teh Groovy script:
import com.canoo.webtest.WebtestCase
import org.junit.Test
public class OBIWebtestTest extends WebtestCase
{
private static xpathSearchResults = "//a...@class='l']"
void testOBILogin()
{
webtest("check login page for obi-dev")
{
invoke url:
"http://xxxx:9704/analytics/saw.dll?Dashboard", description:
"Go to obi-dev (in English)"
verifyTitle "XXXXX"
setInputField name: "NQUser", value: "Administrator"
setInputField name: "NQPassword", value: "######"
clickButton "Log In"
verifyTitle "XXXX"
clickLink label: "XXXX"
verifyTitle "######"
setSelectField xpath:
"//select/opti...@value='Name1']/..", value:
"Name1"
clickLink label:"Go"
}
}
}
This is the error I get:(The failure is on setselect field)
Message
JavaScript error loading page http://XXXX:9704/analytics/saw.dll?Dashboard:
TypeError: Cannot find function createElement in object [object].
(XXXX:9704/analytics/res/b_mozilla/xmluiframework.js#194)
Current response
http://XXXX:9704/analytics/saw.dll?Dashboard
Location
(line: 0)
Details
javascript error TypeError: Cannot find function createElement in object
[object]. (http://XXXX:9704/analytics/res/b_mozilla/xmluiframework.js#194)
line 194
javascript source function () {
[native code, arity=0]
}
javascript call stack TypeError: Cannot find function createElement in
object [object].
(http://XXXX:9704/analytics/res/b_mozilla/xmluiframework.js#194)
at
XUICreateElement(http://XXXX:9704/analytics/res/b_mozilla/xmluiframework.js:194)
at
GFPUpdateValues(http://XXXX:9704/analytics/res/b_mozilla/prompts/globalfilterprompt.js:518)
at (onchange event for HtmlSelect[<select name="saw_47_1a"
id="saw_47_1a"
onchange="GFPUpdateValues('d:dashboard~p:7jt67q5kr8sdeu1c~s:9v73apkf61ei4qcl~g:e8jnbagknsccark8','saw_47_5','d:dashboard~p:7jt67q5kr8sdeu1c~s:9v73apkf61ei4qcl~g:e8jnbagknsccark8form','PromptConstrain',true)">]
in http://XXXX:9704/analytics/saw.dll?Dashboard)
This is line 194 of the java script file:
tElement = tIsland.createElement(sQualifiedName);
I am not sure why createElement is causing an issue in webtest. WOuld
appreciate any help on this.
--
View this message in context:
http://old.nabble.com/Canoo-Webtest-javascript-error-tp29403454p29403454.html
Sent from the WebTest mailing list archive at Nabble.com.
_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest