nikgoodley-ibboost / aost

Automatically exported from code.google.com/p/aost
0 stars 0 forks source link

waitForPopUp throws error #64

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

All of my calls to waitForPopUp windowName, 30000 fail with the latest
code.
Here is what I can see in the log:
Error: cannot find the top object "windowName"

Tried the following:
ui.Window(uid: "windowName", clocator: [name: "Facility_Lookup"]){
                }

but had the following error message:

groovy.lang.MissingMethodException: No signature of method:
org.tellurium.dsl.DslContext$_waitForPopUp_closure9.call() is
applicable for argument types: (null, java.lang.Integer) values:
{null, 30000}
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod
(ClosureMetaClass.java:241)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:756)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:672)
        at groovy.lang.GroovyObjectSupport.invokeMethod
(GroovyObjectSupport.java:44)
        at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod
(InvokerHelper.java:784)
        at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod
(InvokerHelper.java:758)
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN
(ScriptBytecodeAdapter.java:170)
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeClosure
(ScriptBytecodeAdapter.java:605)
        at org.tellurium.object.Window.waitForPopUp(Window.groovy:33)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.groovy.reflection.CachedMethod.invoke
(CachedMethod.java:86)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:756)
        at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod
(InvokerHelper.java:778)
        at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod
(InvokerHelper.java:758)
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN
(ScriptBytecodeAdapter.java:170)
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodNSafe
(ScriptBytecodeAdapter.java:178)
        at org.tellurium.dsl.DslContext.waitForPopUp(DslContext.groovy:123)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.groovy.reflection.CachedMethod.invoke
(CachedMethod.java:86)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912)
        at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN
(ScriptBytecodeAdapter.java:78)
        at org.tellurium.module.OrderPlacement.openFacilityPopup
(OrderPlacement.groovy:267)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.groovy.reflection.CachedMethod.invoke
(CachedMethod.java:86)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912)
        at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN
(ScriptBytecodeAdapter.java:78)
        at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrent0
(ScriptBytecodeAdapter.java:112)
        at org.tellurium.module.OrderPlacement.submitOrder
(OrderPlacement.groovy:298)
        at org.tellurium.test.OrderPlacementTestCase.testCreateSupplyOrder
(OrderPlacementTestCase.java:67)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
        at org.junit.internal.runners.MethodRoadie.runTestMethod
(MethodRoadie.java:98)
        at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:
79)
        at
org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters
(MethodRoadie.java:87)
        at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:
77)
        at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
        at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod
(JUnit4ClassRunner.java:88)
        at org.junit.internal.runners.JUnit4ClassRunner.runMethods
(JUnit4ClassRunner.java:51)
        at org.junit.internal.runners.JUnit4ClassRunner$1.run
(JUnit4ClassRunner.java:44)
        at org.junit.internal.runners.ClassRoadie.runUnprotected
(ClassRoadie.java:27)
        at org.junit.internal.runners.ClassRoadie.runProtected
(ClassRoadie.java:37)
        at org.junit.internal.runners.JUnit4ClassRunner.run
(JUnit4ClassRunner.java:42)
        at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run
(JUnit4TestReference.java:38)
        at org.eclipse.jdt.internal.junit.runner.TestExecution.run
(TestExecution.java:38)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
(RemoteTestRunner.java:460)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
(RemoteTestRunner.java:673)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run
(RemoteTestRunner.java:386)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main
(RemoteTestRunner.java:196) 

Original issue reported on code.google.com by John.Jian.Fang@gmail.com on 18 Nov 2008 at 2:12

GoogleCodeExporter commented 9 years ago
Apparently, there are two errors

1) In Window.groovy

    void waitForPopUp(int timeout, Closure c){
//       c(name, timeout) should be the following
        c(name)
    }

2) DslContext should be changed to use the following

    def waitForPopUp(String uid, int timeout){
        WorkflowContext context = WorkflowContext.getDefaultContext()
        ui.walkTo(context, uid)?.waitForPopUp(timeout) {String loc ->
              accessor.waitForPopUp(loc, Integer.toString(timeout))
        }
    }

Original comment by John.Jian.Fang@gmail.com on 18 Nov 2008 at 9:19

GoogleCodeExporter commented 9 years ago

Original comment by John.Jian.Fang@gmail.com on 19 Nov 2008 at 10:00