Looks like some Javascript errors in the new Engine. I need a favor from you, could you put
useEngineLog(true) before the beginning of your test and see if the Engine returns the JavaScript error stack? If it does, please post that. Perhaps, you can turn on the firebug or firebug lite coming with the selenium server to see if you can find which Javascript line cased the problem. Your problem is very much like the error reported by another user today. Your help is highly appreciated. Thanks, Jian On Wed, May 19, 2010 at 1:02 PM, super fan 911 <[email protected]>wrote: > Ok. Turning on test to use the new tellurium engine introduces a new > set of issues. It's causing my UI definition to be not found, i > think. I'm getting the error below. All I did was put that statement > before the call on my test method. My test extends the > TelluriumTestNGTestCase. > > Environment Variables: > configFileName: TelluriumConfig.groovy > configString: > useEngineCache: true > useClosestMatch: false > useMacroCommand: true > maxMacroCmd: 5 > useTelluriumApi: true > locatorWithCache: true > useCSSSelector: true > useTrace: false > logEngine: false > locale: en_US > > 09:52:34.523 INFO - Command request: cleanCache[, ] on session > 68a5f2ac074a4ebe98a3d94e5d570f19 > 09:52:34.564 INFO - Got result: OK on session > 68a5f2ac074a4ebe98a3d94e5d570f19 > 09:52:34.571 INFO - Command request: testComplete[, ] on session > 68a5f2ac074a4ebe98a3d94e5d570f19 > 09:52:34.571 INFO - Killing Firefox... > 09:52:34.696 INFO - Got result: OK on session > 68a5f2ac074a4ebe98a3d94e5d570f19 > ***** MySampleTest.tearDownAfterClass ***** > 09:52:34.713 INFO - Stopping Acceptor > ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=4444] > 09:52:34.816 INFO - Stopped SocketListener on 0.0.0.0:4444 > 09:52:35.064 INFO - Stopped HttpContext[/selenium-server/driver,/ > selenium-server/driver] > 09:52:35.298 INFO - Stopped HttpContext[/selenium-server,/selenium- > server] > 09:52:35.530 INFO - Stopped HttpContext[/,/] > 09:52:35.530 INFO - Stopped org.mortbay.jetty.ser...@8ca1ada > FAILED: testXYZ > 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: Syntax error, unrecognized > expression: > at > > com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java: > 97) > at > > com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java: > 91) > at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite > $PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java: > 229) > at > > org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java: > 52) > at > > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java: > 129) > at > > org.telluriumsource.component.connector.CustomSelenium.getBundleResponse(CustomSelenium.groovy: > 257) > at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1058) > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886) > at > groovy.lang.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java: > 149) > at groovy.lang.MetaObjectProtocol$invokeMethod.call(Unknown Source) > at > > org.telluriumsource.component.dispatch.Dispatcher.methodMissing(Dispatcher.groovy: > 56) > at groovy.lang.MetaClassImpl.invokeMissingMethod(MetaClassImpl.java: > 813) > at > groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java: > 1107) > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1060) > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886) > at > > org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java: > 39) > at > > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java: > 129) > at > > org.telluriumsource.component.bundle.BundleProcessor.passBundledCommand(BundleProcessor.groovy: > 322) > at org.telluriumsource.component.bundle.BundleProcessor > $passBundledCommand.callCurrent(Unknown Source) > at > > org.telluriumsource.component.bundle.BundleProcessor.process(BundleProcessor.groovy: > 414) > at org.telluriumsource.component.bundle.BundleProcessor > $process.callCurrent(Unknown Source) > at > > org.telluriumsource.component.bundle.BundleProcessor.methodMissing(BundleProcessor.groovy: > 427) > at groovy.lang.MetaClassImpl.invokeMissingMethod(MetaClassImpl.java: > 813) > at > groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java: > 1107) > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1060) > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886) > at > > org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java: > 39) > at > > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java: > 129) > at > > org.telluriumsource.component.data.Accessor.isElementPresent(Accessor.groovy: > 41) > at org.telluriumsource.component.data.Accessor > $isElementPresent.call(Unknown Source) > at > > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java: > 40) > at > > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java: > 117) > at > > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java: > 129) > at > > org.telluriumsource.dsl.BaseDslContext.isElementPresent(BaseDslContext.groovy: > 473) > at org.telluriumsource.dsl.BaseDslContext > $isElementPresent.callCurrent(Unknown Source) > at > > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java: > 44) > at > > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java: > 143) > at > > org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java: > 151) > at com.xyz.module.MyModule.getModuleText(MyModule.groovy:147) > at com.xyz.module.MyModule$getModuleText.call(Unknown Source) > at > > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java: > 40) > at > > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java: > 117) > at > > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java: > 121) > at com.xyz.page.MyPage.findHyperLinks(MyPage.groovy:47) > at com.xyz.page.MyPage$findHyperLinks.call(Unknown Source) > at > > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java: > 40) > at > > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java: > 117) > at > > org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java: > 121) > at workflow.MySampleTest.testXYZ(MySampleTest.groovy:78) > ... Removed 37 stack frames > > > > On May 19, 7:38 am, Jian Fang <[email protected]> wrote: > > Hi Rob, > > > > Great question. > > > > The useTelluriumEngine(boolean isUse) is actually equal to the following > > commands: > > > > void useTelluriumEngine(boolean isUse){ > > useCache(isUse); > > useMacroCmd(isUse); > > useTelluriumApi(isUse); > > } > > > > Remember that Tellurium supports two work modes. > > > > http://code.google.com/p/aost/wiki/TelluriumAWrapOfSelenium > > > > By default, Tellurium still dispatches APIs calls to Selenium APIs > without > > the caching capability. > > The Tellurium new Engine consists of the UI module group locating, i.e. > > locate the whole > > UI module in one shot (however, dynamic elements are handled > differently), > > cache the UI > > module, and use the new jQuery-based Tellurium APIs. Tellurium new Engine > is > > the future path > > for us because it handles the UI module more efficiently and elegantly, > > however, it takes time to grow mature. > > The new jQuery-based APIs haven't been fully implemented and need more > > tests. That is why > > we suggest users to try out the new Engine and if they have any problems > > with the new Engine, > > switch back to the Selenium APIs, and report the problems to us. > > > > One good thing is the test code is pretty agnostic to which test driving > > engine under the hood. But > > you do need to use some commands to switch back and forth, which is not > cool > > at this point. Once > > the new Engine is stable and mature, users don't need to switch back and > > forth any more. At that > > time, we may leave out Selenium core as a legacy artifact and only keep > the > > new Engine in Selenium > > server. > > > > Thanks, > > > > Jian > > > > On Wed, May 19, 2010 at 10:21 AM, Rob Breidecker <[email protected]> > wrote: > > > Jian, > > > > > I have been writing tests without using the useTelluriumEngine(true) > > > statement. Is the engine turned on by default? I have been looking > > > through the documentation for some background on the engine, but so > > > far haven't found many details other than how to turn it off and on. > > > What is its purpose and why would I want it on sometimes and off other > > > times? > > > > > Thanks, > > > Rob > > > > > On May 19, 9:08 am, Jian Fang <[email protected]> wrote: > > > > Yes, I created a test and see the list size is zero when use Selenium > > > APIs. > > > > But if I add > > > > > > useTelluriumEngine(true); > > > > > > The new Tellurium API returns the correct list size 3. > > > > > > Here is my test code: > > > > > > @Test > > > > public void testGetSListSize(){ > > > > connect("SList"); > > > > useTelluriumEngine(true); > > > > int size = jlm.getListSize("description"); > > > > System.out.println("List Size " + size); > > > > useTelluriumEngine(false); > > > > size = jlm.getListSize("description"); > > > > System.out.println("List Size " + size); > > > > } > > > > > > and the console output: > > > > > > Parse configuration file: TelluriumConfig.groovy from project root > > > directory > > > > Configure UI Object Builders using configuration > > > > Configure widget modules using configuration > > > > Configure event handler using configuration > > > > Configure data accessor using configuration > > > > Configure dispatcher using configuration > > > > Configure Embedded Selenium Server using configuration > > > > Configure Selenium Client using configuration > > > > TE: Name: useEngineLog, start: 1274277970387, duration: 20ms > > > > TE: Name: useEngineLog, start: 1274277970387, duration: 20ms > > > > TE: Found exact match for UI Module 'description': > > > > > > {"id":"description","relaxDetails":[],"matches":1,"relaxed":false,"score":100.0,"found":true} > > > > TE: Found exact match for UI Module 'description': > > > > > > {"id":"description","relaxDetails":[],"matches":1,"relaxed":false,"score":100.0,"found":true} > > > > List Size 3 > > > > List Size 0 > > > > TE: Start Time: 1274277970387 > > > > End Time: 1274277970407 > > > > Total Runtime: 20ms > > > > Name: useEngineLog, count: 1, total: 20ms, average: 20ms > > > > > > TE: Start Time: 1274277970387 > > > > End Time: 1274277970407 > > > > Total Runtime: 20ms > > > > Name: useEngineLog, count: 1, total: 20ms, average: 20ms > > > > > > Please try to use new Tellurium Engine. I also created an issue for > the > > > > getListSize problem > > > > > >http://code.google.com/p/aost/issues/detail?id=428 > > > > > > Thanks, > > > > > > Jian > > > > > > On Wed, May 19, 2010 at 9:35 AM, Jian Fang <[email protected] > > > > > wrote: > > > > > I will create a test based on your html snippet and let you know > what I > > > > > find. > > > > > > > Thanks, > > > > > > > Jian > > > > > > > On Wed, May 19, 2010 at 3:34 AM, super fan 911 < > [email protected] > > > >wrote: > > > > > > >> Here is a snippet of my log, > > > > > > >> 00:18:38.828 INFO - Got result: OK,[{"sequ": > > > > >> 30,"name":"getText","returnType":"STRING","returnResult":" > > >www.yahoo.com > > > > >> \u000awww.google.com\u000awww.youtube.com"}] on session > > > > >> 19c60545e5f34501b5b7104e3ea879c9 > > > > >> text =www.yahoo.com > > > > >>www.google.com > > > > >>www.youtube.com > > > > >> 00:18:38.832 INFO - Command request: > > > > >> > getBundleResponse[[{"uid":"","args":[],"name":"getAllLinks","sequ": > > > > >> 31}], ] on session 19c60545e5f34501b5b7104e3ea879c9 > > > > >> 00:18:38.858 INFO - Got result: OK,[{"sequ": > > > > >> 31,"name":"getAllLinks","returnType":"ARRAY","returnResult": > > > > > > ["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]}] > > > > >> on session 19c60545e5f34501b5b7104e3ea879c9 > > > > >> description size = 76 > > > > >> 00:18:38.864 INFO - Command request: > > > > >> > getBundleResponse[[{"uid":"","args":[],"name":"getAllLinks","sequ": > > > > >> 32}], ] on session 19c60545e5f34501b5b7104e3ea879c9 > > > > >> 00:18:38.888 INFO - Got result: OK,[{"sequ": > > > > >> 32,"name":"getAllLinks","returnType":"ARRAY","returnResult": > > > > > > ["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]}] > > > > >> on session 19c60545e5f34501b5b7104e3ea879c9 > > > > > > >> On May 18, 4:58 pm, Jian Fang <[email protected]> wrote: > > > > >> > Hi, > > > > > > >> > Container cannot use UI templates since it usually holds fixed > > > elements. > > > > >> You > > > > >> > can use List instead, i.e., > > > > > > >> > ui.List(uid: "description", clocator: [tag: "div", class: > > > > >> > "description"]) { > > > > >> > UrlLink(uid: "{all}", clocator: [:]) > > > > > > >> > } > > > > > > >> > Then you can use the following method to get back the list size: > > > > > > >> > int getListSize(id) > > > > > > >> > More details here: > > > > > > >> >http://code.google.com/p/aost/wiki/UserGuide070UIObjects#List > > > > > > >> > Thanks, > > > > > > >> > Jian > > > > > > >> > On Tue, May 18, 2010 at 5:50 PM, super fan 911 < > > > [email protected] > > > > >> >wrote: > > > > > > >> > > I have the following HTML markup. > > > > > > >> > > <div class="description"> > > > > >> > > <p> > > > > >> > > <a target="_blank" href="http://www.yahoo.com" > > > > >> > > rel="nofollow">www.yahoo.com</a><br> > > > > >> > > <a target="_blank" href="http://www.google.com" > > > > >> > > rel="nofollow">www.google.com</a><br> > > > > >> > > <a target="_blank" href="http://www.youtube.com" > > > > >> > > rel="nofollow">www.youtube.com</a> > > > > >> > > </p> > > > > >> > > </div> > > > > > > >> > > I have defined the following UI definition. > > > > > > >> > > Container(uid: "description", clocator: [tag: "div", class: > > > > >> > > "description"]) { > > > > >> > > UrlLink(uid: "{all}", clocator: [:]) > > > > >> > > } > > > > > > >> > > My objective is to find out if there are any links between the > > > "div" > > > > >> > > tags. The number of links beween the "div" tags are > dynamically > > > > >> > > created. One way would be to find out the size of the URL > links > > > and > > > > >> > > if it's greater than 0 loop through it and getLink. Another > way i > > > > >> > > thought is to get the inner html source for the "div" tag and > then > > > > >> > > parse it from there. First, i don't know how to get the > UrlLink > > > > >> > > size. Second, I tried to use getHtmlSource and it's giving me > an > > > > >> > > error. Maybe I'm defining the UI wrong? > > > > > > >> > > -- > > > > >> > > 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]<tellurium-users%[email protected]> > <tellurium-users%[email protected]<tellurium-users%[email protected]> > > > > > <tellurium-users%[email protected]<tellurium-users%[email protected]> > <tellurium-users%[email protected]<tellurium-users%[email protected]> > > > > > > > > >> <tellurium-users%[email protected]<tellurium-users%[email protected]> > <tellurium-users%[email protected]<tellurium-users%[email protected]> > > > > > <tellurium-users%[email protected]<tellurium-users%[email protected]> > <tellurium-users%[email protected]<tellurium-users%[email protected]> > > > > > > > > >> > > . > > > > >> > > For more options, visit this group at > > > > >> > >http://groups.google.com/group/tellurium-users?hl=en. > > > > > > >> > -- > > > > >> > 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]<tellurium-users%[email protected]> > <tellurium-users%[email protected]<tellurium-users%[email protected]> > > > > > <tellurium-users%[email protected]<tellurium-users%[email protected]> > <tellurium-users%[email protected]<tellurium-users%[email protected]> > > > > > > > > >> . > > > > >> > For more options, visit this group athttp:// > > > > >> groups.google.com/group/tellurium-users?hl=en. > > > > > > >> -- > > > > >> 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 > > > > ... > > > > read more ยป > > -- > 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]<tellurium-users%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/tellurium-users?hl=en. > > -- 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.
