Announcement

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

    Selenium-Support in nightly build SmartGWT2.3 not working - Fixed user-extensions.js

    Hi @all,

    today i tried to test my SmartGWT application with Selenium and the robotframework. First I used the user-extension.js provided by SmartGWT2.2. But i had some errors, because I don't only use scLocators, also the regular selenium-locators. So I tried the version from the nightly build but I had two errors too.. So I took a closer look and fixed 2 problems with the user-extensions.js. Now everything is working fine for me!

    1. In the Selenium.prototype.doType and some other Methods there was no "isSCLocator"-Check. I implemented this check!

    2. autWindow.isc.AutoTest.getPageCoords(scLocator) is not working on my machine (Firefox 3.6.12, Selenium IDE 1.0.8). I reverted this lines to the SmartGWT 2.2 revision which use autWindow.isc.Element.getElementRect(element);. Thats working perfect for me.

    If you need any help or the code, please feel free to write me.

    Greetz from Germany

    #2
    Originally posted by ReuDa
    Hi @all,

    today i tried to test my SmartGWT application with Selenium and the robotframework. First I used the user-extension.js provided by SmartGWT2.2. But i had some errors, because I don't only use scLocators, also the regular selenium-locators. So I tried the version from the nightly build but I had two errors too.. So I took a closer look and fixed 2 problems with the user-extensions.js. Now everything is working fine for me!

    1. In the Selenium.prototype.doType and some other Methods there was no "isSCLocator"-Check. I implemented this check!

    2. autWindow.isc.AutoTest.getPageCoords(scLocator) is not working on my machine (Firefox 3.6.12, Selenium IDE 1.0.8). I reverted this lines to the SmartGWT 2.2 revision which use autWindow.isc.Element.getElementRect(element);. Thats working perfect for me.

    If you need any help or the code, please feel free to write me.

    Greetz from Germany
    Hi ReuDa,

    How do you use the user-extension.js with robotframework?
    Do you use selenium IDE or selenium-RC?
    Could you share the demo and user-extension.js to me?

    Comment


      #3
      Originally posted by ReuDa
      Hi @all,

      today i tried to test my SmartGWT application with Selenium and the robotframework. First I used the user-extension.js provided by SmartGWT2.2. But i had some errors, because I don't only use scLocators, also the regular selenium-locators. So I tried the version from the nightly build but I had two errors too.. So I took a closer look and fixed 2 problems with the user-extensions.js. Now everything is working fine for me!

      1. In the Selenium.prototype.doType and some other Methods there was no "isSCLocator"-Check. I implemented this check!

      2. autWindow.isc.AutoTest.getPageCoords(scLocator) is not working on my machine (Firefox 3.6.12, Selenium IDE 1.0.8). I reverted this lines to the SmartGWT 2.2 revision which use autWindow.isc.Element.getElementRect(element);. Thats working perfect for me.

      If you need any help or the code, please feel free to write me.

      Greetz from Germany
      Can you post your updated user-extensions.js?

      Comment


        #4
        Originally posted by smartgwt.dev
        Can you post your updated user-extensions.js?
        I failed to use robotframework with selenium to test smartGWT page.
        For example
        Click Element xpath=//td[text()='Logout']

        Robotframework uses selenium 1.03. You can get the element if you use Selenium 2.0X(WebDriver) with the same xpath.

        Comment


          #5
          Hi!

          Sorry for my late answer...

          I use the user-extension with Selenium RC and Selenium IDE. You can find some help about that here:

          http://seleniumhq.org/docs/08_user_extensions.html#using-user-extensions-with-selenium-rc

          I think, you are using Keywords from Robot's Selenium-Library. The only way, to get it work, was to use "native" Selenium keywords like this:

          Call Selenium Api click scLocator=//Button[ID="okDialogButton"]/

          At the moment, I am writing a blog about this. I will reply to this thread and share the link, when i am done.

          Comment


            #6
            You can find my blog mentioned in my last post here:

            http://blog.codecentric.de/en/2010/12/testing-smartgwt-applications-with-selenium-and-robot-framework/

            Comment


              #7
              Nice post!

              We want to use the same component more than once, so our IDs cannot be unique.
              I'm wondering if it's easy to say to the scLocator "where ID starts with 'doSearchForm_' and that that component isVisible" in order to find the correct component.


              So our IDs would be part hardcoded, part randomly generated:
              Code:
              DynamicForm.ID="doSearchForm_123"

              Comment


                #8
                Hello,

                I just saw your post regarding user extension functions. I want to call isc.AutoTest.getObject(locator) to retrieve the FormItem. But I dont know, from selenium which function need to be use to call isc.AutoTest.getObject ?
                We are using python for scripting in selenium.
                Thanks in advance.

                Comment

                Working...
                X