CFSelenium breaks upon executing CLICK command

38 views
Skip to first unread message

Abdul Rasheed

unread,
Sep 5, 2014, 12:30:28 PM9/5/14
to mxu...@googlegroups.com

I am creating testcases using CFSELENIUM and MXUNIT. Upon running, it fails upon executing the CLICK command. It throws the floowing error message.

In the below code it fails at "selenium.click("//button[@id='Submit']");"

"Application: The Response of the Selenium RC is invalid: ERROR: Command execution failure. Please search the user group at https://groups.google.com/forum/#!forum/selenium-users for error details from the log window. The error message is: Argument 1 of EventTarget.dispatchEvent does not implement interface Event."

Please find below the code.

component extends="cfselenium.CFSeleniumTestCase" displayName="seleniumBase" {

public void function beforeTests() {

    //your local host
    variables.browserUrl = "url";
    variables.browserCommand = "*firefox";

    super.beforeTests();
    selenium.setTimeout(50000);
    selenium.setSpeed( 500 );
}

public void function afterTests() {
    super.afterTests();
}

private void function logIn(){
    selenium.open(variables.browserUrl);
    selenium.waitForPageToLoad("30000");

    //your username
    variables.backofficeUserName = "test";
    selenium.type("id=UserName", variables.backofficeUserName);

    //your password
    variables.backofficePassword = "test";
    selenium.type("//input[@type = 'password']", variables.backofficePassword);

    selenium.click("//button[@id='Submit']");
    selenium.waitForPageToLoad("30000");
}

}

Gareth Arch

unread,
Sep 5, 2014, 2:25:59 PM9/5/14
to mxu...@googlegroups.com
You're not opening a valid URL in any of the code you are displaying.  Plus this would be something via Selenium vs. MXUnit.

Marc Esher

unread,
Sep 5, 2014, 5:59:58 PM9/5/14
to mxu...@googlegroups.com
Hey Abdul,

Make sure you're using the latest CFSelenium at https://github.com/teamcfadvance/CFSelenium


Marc


--
You received this message because you are subscribed to the Google Groups "mxunit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mxunit+un...@googlegroups.com.
To post to this group, send email to mxu...@googlegroups.com.
Visit this group at http://groups.google.com/group/mxunit.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages