It is invalid only in Selenium, right? For xml document processing, you have to add name space there.
I will check where caused the problem in Selenium core. Thanks, Jian On Fri, May 15, 2009 at 10:10 AM, Harihara Vinayakaram <[email protected]>wrote: > Hi > I remember reading that in general an XPath with namespace (any namespace) > is treated as Invalid > //xforms:lab...@id="message"] > > which is why a document.evaluate works for these types of expressions. I > have attached an example project which simulates the same > > Regards > Hari > > > > On Fri, May 15, 2009 at 6:20 PM, Jian Fang <[email protected]>wrote: > >> Would >> >> //descendant-or-self::xforms:lab...@id="message"] >> >> be a valid XPath in general? >> >> We can add a custom locate strategy for you, but the best way is to fix >> Selenium core itself >> if the XPath is valid in general. Could you provide us a test case so that >> I can dig into Selenium >> core to see what caused that problem? >> >> Thanks, >> >> Jian >> >> >> On Fri, May 15, 2009 at 8:44 AM, Harihara Vinayakaram >> <[email protected]>wrote: >> >>> Putting the namespace results in the following problem in Selenium >>> >>> Invalid xpath: //descendant-or-self::xforms:lab...@id="message"] >>> >>> >>> >>> >>> I had solved this problem in Selenium by using the Document.evaluate and >>> using a separate locator >>> >>> >>> >>> >>> method . Not sure how I can call the Document.evaluate in this case from >>> Tellurium >>> >>> Regards >>> Hari >>> >>> >>> >>> >>> On Thu, May 14, 2009 at 10:30 PM, Jian Fang <[email protected]>wrote: >>> >>>> Maybe later, we can refactor this so that you can register the namespace >>>> in defineUi, i.e., put into a queue, >>>> and let Tellurium Core handle the actual registration automatically. >>>> >>>> On Thu, May 14, 2009 at 12:58 PM, Jian Fang >>>> <[email protected]>wrote: >>>> >>>>> For example, in the @BeforeClass or @Before method after you start the >>>>> Selenium server. >>>>> >>>>> On Thu, May 14, 2009 at 12:57 PM, Jian Fang >>>>> <[email protected]>wrote: >>>>> >>>>>> No, should put in your test class because it will talk to Selenium >>>>>> server to add the name space, which is a runtime call. >>>>>> >>>>>> >>>>>> On Thu, May 14, 2009 at 12:50 PM, Harihara Vinayakaram < >>>>>> [email protected]> wrote: >>>>>> >>>>>>> Can I call the registerNameSpace in the defineUi ? >>>>>>> >>>>>>> >>>>>>> On Thu, May 14, 2009 at 10:02 PM, Jian Fang < >>>>>>> [email protected]> wrote: >>>>>>> >>>>>>>> I added registerNamespace method for you and you can try to register >>>>>>>> the namespace before you make calls >>>>>>>> to Selenium server. Namespace is enabled on UI objects, for example, >>>>>>>> >>>>>>>> ui.Container(uid: "TEST", namespace: "ns2", clocator: [:]){ >>>>>>>> >>>>>>>> } >>>>>>>> >>>>>>>> Somewhere, you should call >>>>>>>> registerNamespace("ns2", "http://tellurium.org/ns"); >>>>>>>> >>>>>>>> you can do the same to add the namespace in and see if it works for >>>>>>>> you. >>>>>>>> >>>>>>>> Thanks, >>>>>>>> >>>>>>>> Jian >>>>>>>> >>>>>>>> >>>>>>>> On Thu, May 14, 2009 at 12:23 PM, Harihara Vinayakaram < >>>>>>>> [email protected]> wrote: >>>>>>>> >>>>>>>>> Hi >>>>>>>>> I have one question regarding the usage of custom classes. Can I >>>>>>>>> directly use the XPath rather than defining an UI module If so how >>>>>>>>> do I do >>>>>>>>> that ? .The reason I am asking this is because I have elements that >>>>>>>>> belong >>>>>>>>> to a different name space and the last time I remember I could not >>>>>>>>> define >>>>>>>>> those elements in the Ui >>>>>>>>> >>>>>>>>> Let me know >>>>>>>>> >>>>>>>>> Regards >>>>>>>>> Hari >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>>> >>>> >>> >>> >>> >> >> >> > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
