I tried opening the same window using pure Selenium and it worked fine. Also selectWindow worked.
Possibly Tellurium is not picking up the values from the uiObject correctly? On Mar 27, 6:57 pm, John <[email protected]> wrote: > Did you see Tellurium passed in the correct window ID? Was it caused > by the fact > that Tellurium passed in null as the window ID or Selenium did not > honor the window ID > and just passed in null? > > Thanks, > > Jian > > On Mar 27, 1:28 pm, dominicm <[email protected]> wrote: > > > > > Hi, > > > I need to use uiObject.openWindow as I'm calling the code from Java > > not groovy. I did try calling from groovy with the same result. > > > I've debugged it into Selenium and it is passing null as the windowId. > > I manually edited the windowId parameter and it worked. > > It also seems to be passing null to selectWindow. > > > Selenium server log window with windowId hacked in: > > 17:19:42.275 INFO - Command request: openWindow[http:// > > uk.site.sports.sports.qa. > > ham.uk.betfair/betting/LoadRunnerInfoAction.do? > > marketId=100006200&selectionId=27 > > 7129&timeZone=Europe/ > > London®ion=GBR&locale=en&brand=betfair¤cy=GBP, mor > > eInfo] on session a57db400a19a4363abf91edb306ab6f1 > > 17:19:42.384 INFO - Got result: OK on session > > a57db400a19a4363abf91edb306ab6f1 > > 17:21:45.931 INFO - Command request: selectWindow[null, ] on session > > a57db400a19 > > a4363abf91edb306ab6f1 > > > Stack trace: > > at com.betfair.assertions.general.ProcessKeyword.run > > (ProcessKeyword.java:741) > > ... 27 more > > Caused by: java.lang.NullPointerException > > at java.net.URLEncoder.encode(Unknown Source) > > at com.thoughtworks.selenium.DefaultRemoteCommand.urlEncode > > (DefaultRemoteCommand.java:86) > > at > > com.thoughtworks.selenium.DefaultRemoteCommand.getCommandURLString > > (DefaultRemoteCommand.java:59) > > at com.thoughtworks.selenium.HttpCommandProcessor.doCommand > > (HttpCommandProcessor.java:86) > > at com.thoughtworks.selenium.DefaultSelenium.openWindow > > (DefaultSelenium.java:339) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > > at java.lang.reflect.Method.invoke(Unknown Source) > > at org.codehaus.groovy.reflection.CachedMethod.invoke > > (CachedMethod.java:86) > > at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:234) > > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1061) > > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:892) > > at groovy.lang.DelegatingMetaClass.invokeMethod > > (DelegatingMetaClass.java:142) > > at groovy.lang.MetaObjectProtocol$invokeMethod.call(Unknown Source) > > at org.tellurium.dispatch.Dispatcher.invokeMethod(Dispatcher.groovy: > > 27) > > at org.codehaus.groovy.runtime.callsite.PogoInterceptableSite.call > > (PogoInterceptableSite.java:46) > > at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call > > (AbstractCallSite.java:128) > > at org.tellurium.event.EventHandler.openWindow(EventHandler.groovy: > > 344) > > at org.tellurium.event.EventHandler$openWindow.call(Unknown Source) > > at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall > > (CallSiteArray.java:43) > > at org.tellurium.event.EventHandler$openWindow.call(Unknown Source) > > at org.tellurium.dsl.DslContext$_openWindow_closure8.doCall > > (DslContext.groovy:149) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > > at java.lang.reflect.Method.invoke(Unknown Source) > > at org.codehaus.groovy.reflection.CachedMethod.invoke > > (CachedMethod.java:86) > > at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:234) > > at > > org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod > > (ClosureMetaClass.java:272) > > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:892) > > at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call > > (PogoMetaClassSite.java:39) > > at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call > > (AbstractCallSite.java:128) > > at org.tellurium.object.Window.openWindow(Window.groovy:21) > > at org.tellurium.object.Window$openWindow.call(Unknown Source) > > at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callSafe > > (AbstractCallSite.java:96) > > at org.tellurium.dsl.DslContext.openWindow(DslContext.groovy:148) > > at org.tellurium.dsl.DslContext$openWindow.callCurrent(Unknown > > Source) > > at > > org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent > > (CallSiteArray.java:47) > > at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent > > (AbstractCallSite.java:142) > > at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent > > (AbstractCallSite.java:154) > > at com.betfair.www.website.ui.RunnerSummary.doOpenMoreInfo > > (RunnerSummary.groovy:35) > > at > > com.betfair.www.website.methods.BrowserManager.doGoToRunnerSummary > > (BrowserManager.java:858) > > at > > com.betfair.www.website.methods.RunnerSummaryView.goToRunnerSummary > > (RunnerSummaryView.java:11) > > ... 32 more > > > On Mar 27, 3:52 pm, John <[email protected]> wrote: > > > > Here is the Java doc. Maybe it mentioned window's name and then I used > > > the name attribute. > > > > /** Opens a popup window (if a window with that ID isn't already > > > open). > > > After opening the window, you'll need to select it using the > > > selectWindow > > > command. > > > > <p>This command can also be a useful workaround for bug SEL-339. In > > > some cases, Selenium will be unable to intercept a call to window.open > > > (i > > > f the call occurs during or before the "onLoad" event, for example). > > > In those cases, you can force Selenium to notice the open window's > > > name by using the Selenium openWindow command, using > > > an empty (blank) url, like this: openWindow("", "myFunnyWindow").</p> > > > @param url the URL to open, which can be blank > > > @param windowID the JavaScript window ID of the window to select > > > */ > > > void openWindow(String url,String windowID); > > > > On Mar 27, 11:46 am, John <[email protected]> wrote: > > > > > You are right, the user guide was wrong and it should be > > > > > openWindow UID, url > > > > > under the hood, tellurium actually calls Selenium RC method > > > > > openWindow(url, name) > > > > > I do not remember why I chose to use name, not id from the Window > > > > object, which has > > > > both id and name attributes. But for your case, there are the same and > > > > should not matter. > > > > > Why you need to call on the uiObject > > > > > uiObject.openWindow("moreInfo","http://www.some.url") > > > > > instead of > > > > > openWindow("moreInfo","http://www.some.url") ? > > > > > Could you post your full stack trace so that I can see what got > > > > called? > > > > > Thanks, > > > > > Jian > > > > > On Mar 27, 11:22 am, dominicm <[email protected]> wrote: > > > > > > Hi, > > > > > > When using openWindow(uid, url) my test crashes. It seems to be coming > > > > > from some URLEncode function in Selenium. > > > > > > My code is: > > > > > ui.Window(uid:'moreInfo',clocator: > > > > > [name:'moreInfoChart',id:'moreInfoChart']){ > > > > > > } > > > > > > uiObject.openWindow("moreInfo","http://www.some.url") > > > > > > I've noticed that the user guide is inconsistent with the java doc so > > > > > I suspect this could be a bug- Hide quoted text - > > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
