Hello everybody,

recently I've been trying to get tellurium to work with the project
I'm working on, however
it has been a bumpy road so far.
I've set up the environment using

mvn archetype:create -DgroupId=your_group_id -
DartifactId=your_artifact_id \
-DarchetypeArtifactId=tellurium-junit-archetype \
-DarchetypeGroupId=org.telluriumsource -DarchetypeVersion=0.7.0 \
-DarchetypeRepository=http://maven.kungfuters.org/content/repositories/
releases


and made a simple web page to play around with xpath locators.
The problem is, that they don't seem to work. At all.

Here is a simple example - the web page :

<html>
        <head></head>
        <body>
                <a href="http://www.foo.com";>Foo</a>
        </body>
</html>


Ui module :

public class FooModule extends DslContext{

         public void defineUi() {
     ui.UrlLink(uid: "TheLink", locator : "//a");
   }
}

Test :
public class FooTestCase extends TelluriumJUnitTestCase{

  private static FooModule foo;

    @BeforeClass
    public static void initUi() {
        foo  =  new FooModule();
        foo.defineUi();
        connectSeleniumServer();
        useTelluriumEngine(true);
        useCssSelector(true)

        useTrace(true);
    }

   @Before
    public void connectToLocal() {
     connectUrl("file:///C:/Temp/html/index.html")
    }

  @Test
  public void execFlow1(){
    foo.click "TheLink"
    pause 10000
  }

}

Now, if I change the ui module to :
    ui.UrlLink(uid: "TheLink",  clocator : [tag :"a"])
then everything works fine. However running it with the locator
described above I get:

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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
        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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
        at
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
88)
        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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
        at
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
88)
        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.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.component.bundle.BundleProcessor.flush(BundleProcessor.groovy:
372)
        at org.telluriumsource.component.bundle.BundleProcessor
$flush.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
org.telluriumsource.framework.TelluriumFramework.pause(TelluriumFramework.groovy:
371)
        at
org.telluriumsource.test.java.BaseTelluriumJavaTestCase.pause(BaseTelluriumJavaTestCase.java:
156)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
        at
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
88)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
        at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:
1326)
        at
org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.callStatic(StaticMetaClassSite.java:
47)
        at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:
48)
        at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:
167)
        at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:
175)
        at test.FooTestCase.execFlow1(FooTestCase.groovy:32)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
        at org.junit.runners.model.FrameworkMethod
$1.runReflectiveCall(FrameworkMethod.java:44)
        at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:
15)
        at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:
41)
        at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:
20)
        at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:
28)
        at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:
76)
        at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:
50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
        at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:
28)
        at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:
31)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
        at
com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:
65)




According to tellurium manual  such a locator using xpath should be
valid,
so I don't know what's going on.

I'm running the test using Firefox 3.6.10 on a Windows 7 box.


Regards,
dratewka

-- 
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