Hi,
I have just written my first Tellurium test case and I am seeing the
following error on execution:
com.thoughtworks.selenium.SeleniumException: ERROR: Command execution
failure. Please search the Tellurium User Group at
http://groups.google.com/group/tellurium-users for error details from
the log window. The error message is: element.options is undefined
at
com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:
97)
at
com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:
91)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
I searched here and did a Google search but I was not able to find any
error that quite matched this. Any ideas what it happening?
The code is pretty simple.
public void defineUi() {
ui.Form(uid: "createAccount", clocator: [tag: "form", method:
"post", action: "
https://www.mysite.com/SignupProc.jsp"])
{
InputBox(uid: "emailInput", clocator: [tag: "input", type:
"text", name: "email"])
InputBox(uid: "passwordInput", clocator: [tag: "input", type:
"password", name: "newPassword"])
InputBox(uid: "passwordConfirmInput", clocator: [tag: "input",
type: "password", name: "newPassword2"])
InputBox(uid: "firstNameInput", clocator: [tag: "input", type:
"text", name: "firstName"])
InputBox(uid: "lastNameInput", clocator: [tag: "input", type:
"text", name: "lastName"])
Selector(uid: "countrySelector", clocator: [tag: "select", name:
"country"])
Selector(uid: "mediaSelector", clocator: [tag: "select", id:
"intendedMedia", name: "intendedMedia"])
CheckBox(uid: "interactPrefCheckBox", clocator: [tag: "input",
type: "checkbox", value: "true", name: "interactPrf", class:
"checkbox"])
InputBox(uid: "referrerCodeInput", clocator: [tag: "input", type:
"text", name: "referrerCode"])
SubmitButton(uid: "createMyAccountSubmit", clocator: [tag:
"input", type: "submit", value: "Create My Account", name: "submit",
id: "create_account"])
}
}
All I am trying to test right now is mediaSelector and the first test
is just confirming that it contains types to select:
public class CreateAccountTest extends TelluriumJUnitTestCase
{
private static CreateAccountModule uiMod;
@BeforeClass
public static void initUi()
{
uiMod = new CreateAccountModule();
uiMod.defineUi();
}
@Before
public void testingSetUp()
{
connectSeleniumServer();
connectUrl("
http://www.mysite.com/Signup.jsp");
}
@Test
public void testMediaSelectorBox()
{
String[] mediaTypes = uiMod.getMediaTypes();
Assert.assertNotNull(mediaTypes);
}
Thanks for any help.
-Kristin