You are welcome. Try to debug the following two scripts: tellurium.js and
tellurium-extensions.js.

Start from the method,

Tellurium.prototype.locateElementByCacheAwareJQuerySelector

since you are using jQuery cache.

If use jQuery without cache, you can start from

Tellurium.prototype.locateElementByJQuerySelector

Let us know what you found.

Thanks,

Jian

On Fri, Jul 24, 2009 at 2:49 PM, Paul <[email protected]> wrote:

>
> Hi Jian,
>
> I have been attempting to debug the problem in the way you mentioned
> with Firefox, Firebug, and setting breakpoints in eclipse. The problem
> I am facing is I can't seem to find the correct piece of javascript to
> set a breakpoint in. I have tried setting breakpoints in numerous
> different places, but none of them are getting hit. I have also tried
> clicking on the "break on next" button in Firebug, but setting a
> breakpoint on that line has no effect either. Finally I have tried
> enabling "Break on all Errors" and "Track Throw / Catch", but this
> also has had no effect. Am I missing something obvious / is there a
> way to figure out where I should place a breakpoint?
>
> One other thing that might be useful is the last command that is run
> by Selenium Server before the error is generated is the following:
>
> 11:34:13.559 INFO - Command request: mouseOver[jquerycache=
> {"uid":"accountEdit.save","locator":"#editPage input.btn[type=submit]
> [title=Save][name=save]","unique":true,"optimized":"#editPage input.btn
> [type=submit][title=Save][name=save]","cacheable":true}, ] onsession
> c85706b196324669aadb0d38d22abcc2
>
> Thanks for all your help so far,  I really appreciate it.
>
> -Paul
>
> On Jul 24, 8:15 am, Jian Fang <[email protected]> wrote:
> > I did a reverse engineering to generate html source from your UI module
> and
> > tested against it.
> > Seems the UI module does not have any problem for both XPath and jQuery
> > selector. The exception
> > should be caused by some other things such as Javascript event triggers.
> As
> > I said, to debug
> > the JavaScript is the best way for you. For Firefox, you can use Firebug
> > with the same steps I listed.
> > Make sure to use a Firefox profile so that the Firebug will be included
> in
> > the launched Firefox instance.
> >
> > Here are the test code I used:
> >
> >  public class UserModule extends DslContext {
> >     public static String HTML_BODY = """
> > <form id="editPage" method="post">
> >   <input type="text" name="acc2" id="acc2"/>
> >   <input type="text" name="acc23" id="acc23"/>
> >   <input type="text" name="acc8" id="acc8"/>
> >   <h2>Account Edit </h2>
> >   <input class="btn" type="submit" title="Save" name="save"/>
> > </form>
> >     """
> >     public void defineUi() {
> >       ui.Form(uid: "accountEdit", clocator: [tag: "form", id: "editPage",
> > method: "post"]) {
> >         InputBox(uid: "accountName", clocator: [tag: "input", type:
> "text",
> > name: "acc2", id: "acc2"])
> >         InputBox(uid: "accountSite", clocator: [tag: "input", type:
> "text",
> > name: "acc23", id: "acc23"])
> >         InputBox(uid: "accountRevenue", clocator: [tag: "input", type:
> > "text", name: "acc8", id: "acc8"])
> >         TextBox(uid: "heading", clocator: [tag: "h2", text: "%%Account
> Edit
> > "])
> >         SubmitButton(uid: "save", clocator: [tag: "input", class: "btn",
> > type: "submit", title: "Save", name: "save"])
> >       }
> >     }
> >
> >     public void doCreateAccount() {
> >       type "accountEdit.accountName", "ccc"
> >       click "accountEdit.save"
> >       waitForPageToLoad 30000
> >     }
> >
> > }
> >
> > public class UserTestCase extends TelluriumJavaTestCase {
> >     private static MockHttpServer server;
> >
> >     @BeforeClass
> >     public static void setUp(){
> >         server = new MockHttpServer(8080);
> >         server.registerHtmlBody("/account.html", UserModule.HTML_BODY);
> >         server.start();
> >     }
> >
> >     @Test
> >     public void testGetSeparatorAttribute(){
> >         UserModule lm = new UserModule();
> >         lm.defineUi();
> >         connectUrl("http://localhost:8080/account.html";);
> >         lm.disableJQuerySelector();
> >         lm.doCreateAccount();
> >         connectUrl("http://localhost:8080/account.html";);
> >         lm.useJQuerySelector();
> >         lm.doCreateAccount();
> >     }
> >
> >     @AfterClass
> >     public static void tearDown(){
> >         server.stop();
> >     }
> >
> > }
> >
> > Thanks,
> >
> > Jian
> >
> > On Thu, Jul 23, 2009 at 8:21 PM, Jian Fang <[email protected]>
> wrote:
> > > Selenium 1.0.1 supports Firefox 3.5 and the custom selenium server
> 1.0.1-te
> > > also
> > > supports Firefox 3.5. But you can try Firefox 3.0 to see if the
> exception
> > > is still there.
> >
> > > Thanks,
> >
> > > Jian
> >
> > > On Thu, Jul 23, 2009 at 8:11 PM, Paul <[email protected]> wrote:
> >
> > >> One other thought I had is I am currently running these tests through
> > >> Firefox 3.5 via:
> >
> > >> browser = "*chrome"
> >
> > >> does this custom version of Selenium server support FF 3 ?
> >
> > >> Thanks,
> > >> Paul
> >
> > >>  Should I be using an older version of
> >
> > >> On Jul 23, 4:44 pm, Paul <[email protected]> wrote:
> > >> > Hi Jian,
> >
> > >> > Thanks for the reply. I will take your advice and see if I can gain
> > >> > any info from debugging the error.
> >
> > >> > I am currently using selenium-server-1.0.1-te.jar as this is what I
> > >> > found in the Tellurium 0.6.0 dependencies  folder available on the
> > >> > download page. Is this the latest version of the custom selenium
> > >> > server or is there a newer jar out there that I should be using?
> >
> > >> > Thanks,
> > >> > Paul
> >
> > >> > On Jul 23, 11:58 am, Jian Fang <[email protected]> wrote:
> >
> > >> > > "XXXX is not a function" is really a general error in Selenium and
> it
> > >> does
> > >> > > not tell
> > >> > > you what is the real exception, which is why we need exception
> > >> hierarchy in
> > >> > > Tellurium 0.7.0.
> >
> > >> > > Make sure you use the latest custom selenium server.
> >
> > >> > > What locators are you using, xpath or jQuery selector? Try both to
> see
> > >> if
> > >> > > one is working.
> >
> > >> > > If you use Windows system, you  can use Microsoft Script Debugger
>  to
> > >> *debug
> > >> > > *
> > >> > > the error.
> >
> > >> > > To *debug* the javascript code, follow the following step,
> >
> > >> > > 1) Start custom selenium server in multiWindow mode
> >
> > >> > > java -jar selenium-server -multiWindow
> >
> > >> > > another useful command option is -*debug*, which will print out
> all
> > >> > > trace messages
> >
> > >> > > 2) *Debug* the Java code in IDE and set a break point somewhere in
> the
> > >> > > code
> > >> > > 3) Once the Java process paused, open up the Microsoft script
> debugger
> > >> > > (or Editor MSE7.exe)
> > >> > > 4) Attach you debugger to the running IE instance and you will see
> the
> > >> > > javascript you want  to *debug*, set a break point there.
> > >> > > 5) Resume you Java process and it will wait there once the
> breakpoint
> > >> > > is hit in the Javascript  debugger. Then you can step into, step
> over,
> > >> > > or run the Javascript.
> >
> > >> > > Thanks,
> >
> > >> > > Jian
> >
> > >> > > On Thu, Jul 23, 2009 at 2:21 PM, Paul <[email protected]>
> wrote:
> >
> > >> > > > Hey all,
> >
> > >> > > > While executing what appears to be a simple test case I am
> getting
> > >> the
> > >> > > > following error message from selenium
> >
> > >> > > > ERROR: Command execution failure. Please search the forum at
> > >> > > >http://clearspace.openqa.orgforerrordetails from the log window.
> > >> > > > The error message is: element.dispatchEvent is not a function
> >
> > >> > > > I am trying to have a log file generated by uncommenting the
> line
> >
> > >> > > > logFile = "selenium.log"
> >
> > >> > > > in TelluriumConfig.groovy, but for some reason it is still not
> > >> getting
> > >> > > > generated. Maybe its because I am running Selenium externally?
> >
> > >> > > > This is the module I am using:
> >
> > >> > > > ui.Form(uid: "accountEdit", clocator: [tag: "form", id:
> "editPage",
> > >> > > > method: "post"]){
> > >> > > >                    InputBox(uid: "accountName", clocator: [tag:
> > >> "input",
> > >> > > > type:
> > >> > > > "text", name: "acc2", id: "acc2"])
> > >> > > >                    InputBox(uid: "accountSite", clocator: [tag:
> > >> "input",
> > >> > > > type:
> > >> > > > "text", name: "acc23", id: "acc23"])
> > >> > > >                    InputBox(uid: "accountRevenue", clocator:
> [tag:
> > >> "input",
> > >> > > > type:
> > >> > > > "text", name: "acc8", id: "acc8"])
> > >> > > >                    TextBox(uid: "heading", clocator: [tag: "h2",
> > >> text:
> > >> > > > "%%Account
> > >> > > > Edit"])
> > >> > > >                    SubmitButton(uid: "save", clocator: [tag:
> > >> "input",
> > >> > > > class: "btn",
> > >> > > > type: "submit", title: "Save", name: "save"])
> > >> > > >                }
> >
> > >> > > > and here is the test case:
> >
> > >> > > > public void doCreateAccount()
> > >> > > >        {
> > >> > > >            type("accountEdit.accountName", "ccc");
> > >> > > >            click("accountEdit.save");
> > >> > > >            waitForPageToLoad(30000);
> > >> > > >        }
> >
> > >> > > > I have tried tweaking the module (i.e. swapping out SubmitButton
> > >> with
> > >> > > > Button, changing Form to Container, etc.), but that seems to
> have no
> > >> > > > effect. It appears that it isn't a location problem anyhow
> though so
> > >> > > > maybe the module isn't the issue. I apologize for once again
> being
> > >> > > > unable to post source html due to the policy at my organization.
> >
> > >> > > > If anyone has an idea about the problem I'm having I would be
> very
> > >> > > > glad to hear any tips / advice. Thanks for your time.
> >
> > >> > > > -Paul
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tellurium-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tellurium-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to