Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    #16
    among other scenarios, the forum below outlines our issue.

    http://forums.smartclient.com/showthread.php?t=19703

    There is no simple way for us to keep track of everything that we have marked for destroy. So what we wanted to do instead is to make the ID's completely unique instead of what we currently have. Our ID's have be to generated dynamically, which means we do not know the ID's of the elements until they are actually drawn and created. This is why we wanted to see if we can somehow access the _cwID property that we would add to the elements and write a script that keeps track of the old ID and the new ID so that we may do a search/replace afterwards.

    Comment


      #17
      It should be simple to keep track of things marked for destroy. Just call a helper method everywhere you use this API, and track things. This is likely to be simpler than migrating all your test scripts to a new ID assignment convention.

      However you could hack something up so that you add JS code to your test environment where there is, for example, a button you can click that dumps the ID and _cwID of all your components, so you can capture this information and use it for search and replace.

      Comment


        #18
        We only call markForDestroy on our elements.

        Comment


          #19
          I am wondering if there is any script in AutoTest.js or selenium's core scripts that i can use to return the smartclient object based on your locator. I tried with getElement, but it only returns DOM element.

          Comment


            #20
            I think the getLocatorFormItem in AuToTest.js can be used for my question, however, it always give me" _2.find is not a function" error when i call it.
            Any idea what this error is?
            Originally posted by kevincy
            I am wondering if there is any script in AutoTest.js or selenium's core scripts that i can use to return the smartclient object based on your locator. I tried with getElement, but it only returns DOM element.

            Comment


              #21
              Should we be able to use getLocatorFormItem??

              Comment


                #22
                AutoTest.getLocatorCanvas() and AutoTest.getLocatorFormItem() are not publicly exposed / officially supported.
                We can't guarantee these APIs won't be replaced by something else in the future.

                Having said that they should actually work, and do for us.

                In a quick sanity check against the Jan 24 8.2p build, running the "complete application" from the showcase evaluating the following behaves as expected:
                Code:
                scLocator='//SearchForm[ID="findForm"]/item[name=SKU||title=SKU||index=0||Class=TextItem]/element'
                isc.AutoTest.getLocatorFormItem(scLocator)
                If you can show us a simple test where you're seeing this error (with a valid locator string that actually does return a form item's element) we'll take a quick look and see if there's an easy fix or workaround we can point you to.

                Comment


                  #23
                  Does SmartClient support AndroidDriver and iPhone Drivers for selenium? Last I heard you guys did not recommend using Selenium webdrivers

                  Comment


                    #24
                    They have WebDriver support, but you have to install an app on the phone to use it, so it's really running a WebControl (in iOS) and not Safari as such. We recommend using classic Selenium for both desktop and mobile.

                    Comment


                      #25
                      Oh ok. So classic selenium SHOULD work for testing on Mobile devices? And we do not have to use the web drivers?

                      Comment


                        #26
                        Also, is there any difference on how to run the classic selenium on these devices as opposed to running them on desktop?

                        Comment


                          #27
                          Correct, classic Selenium works there. Running it is normal (can't run the IDE of course), Selenium RC support would require a native app, we're unsure if they will be creating this.

                          Comment


                            #28
                            We are currently using the method waitToLoad() for dynamic forms - is there a chance this can be available for listgrid rows and menu dropdowns? Or is there an alternative that we can do to time when the data has arrived and has been drawn on the client side in selenium?

                            Comment


                              #29
                              What is waitForLoad()? That's not one of ours and doesn't seem to be a Selenium built-in.

                              Comment


                                #30
                                It seems this is our internal method so I will revise my question.

                                Is there any way to know when the listgrid records/dropdown menu has been fully rendered? We currently have added pauses to ensure that the clicks do not get fired before the records are fully generated.

                                Comment

                                Working...
                                X