Announcement

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

    Problems using Selenium IDE with user-extensions

    Hi Isomorphic,

    I´m trying to record tests using Selenium IDE 2.9.1 with Firefox 53.0. The Application is build with the smartgwtee-12.0p jars and the user-extension.js and user-extenstion-ide.js from the subdirectory "selenium" is included in the Selenium IDE in Firefox.

    1. I opened Firefox and typed in the URL of the application, then the login.jsp came up. We are using Tomcat Realm Security and Plain HTML Login Page like recommended in

    https://isomorphic.atlassian.net/wik...mcat+JDBCRealm

    and

    https://www.smartclient.com/smartgwt...tart_Guide.pdf p.40

    2. I opened the Selenium IDE from extras/Selenium IDE within Firefox

    3. The site comes up, and i wanted to insert the credentials. The click in the "username"-field is no problem, but when i start entering the username the following exception comes up:


    Click image for larger version

Name:	exception3.png
Views:	140
Size:	21.7 KB
ID:	253130

    I unistalled Firefox, deleted all asossiated files and made a clean install, but that didn't help.

    Maybe I'm missing something, but i don't know what. Could you give some advice please?

    Thanks in advance,

    Kind Regards

    #2
    The problem is that the SmartClient JavaScript Framework hasn't been loaded, but isc (or more precisely, window.isc) is defined.

    With your app visible, open the browser debugger/console, and tell us what the result of the following four expressions are:
    Code:
    isc
    isc.Canvas
    isc.AutoTest
    isc.version

    Comment


      #3
      That seemed to was the problem. I entered the expressions before the login and after. After the login everything was loaded, but before isc.Canvas and isc.AutoTest were undefined.
      I took a look at the login.jsp and included the line bellow:

      Code:
      <script type="text/javascript" src="lms/sc/modules/ISC_Core.js<%=version %>"></script>
      After that isc.Canvas and isc.AutoTest were available at the login.jsp and the mentioned exception in the Selenium IDE was gone. Thanks for putting me in the right direction!

      Comment


        #4
        Hi Isomorhic,

        the IDE works just fine, as I said in the previous post, but i wonder if there is another way without loading the whole ISC_Core.js in the login.jsp. If so, could you please provide it?

        Comment


          #5
          So again, you should not have to be loading ISC_Core.js - something in your page defines the "isc" variable, making the autotest system think that the SmartClient runtime is loaded, when it is not and does not have to be.

          Instructions for figuring out what's going on are in our previous post, but you ignored this.

          Make sure you reverse your change of loading ISC_Core.js before trying out those instructions.

          Comment


            #6
            Ok, here are the outputs:



            Click image for larger version

Name:	console1.png
Views:	93
Size:	6.7 KB
ID:	253159


            isc detail:

            Click image for larger version

Name:	console2.png
Views:	100
Size:	16.0 KB
ID:	253161
            Click image for larger version

Name:	console4.png
Views:	90
Size:	15.6 KB
ID:	253163
            Attached Files

            Comment


              #7
              Hi Isomorphic,

              the login screen uses this code in it's <head>:
              Code:
                  <script type="text/javascript">var isomorphicDir = "lms/sc/";</script>
                  <script type="text/javascript" src="lms/sc/modules/ISC_FileLoader.js"></script>
                  <script type="text/javascript">FL.modulesDir = "modules/"; FL.defaultSkin = "Simplicity"; FL.cacheISC();</script>
              Best regards
              Blama

              Comment


                #8
                Without the SmartClient core, our user extensions can't create SC locators, but we have already made a change (in today's builds, dated 2018-05-09) to avoid the error message you reported. With just the FileLoader module loaded, you should now be error-free, but you'll just get standard Selenium IDE locators (as if our extensions hadn't been loaded).

                Comment


                  #9
                  Thanks for your response! I installed the new version (smartgwtee-12.1d, dated 2018-05-09) and as you said, the exception at click is gone. So I went on and recorded a new test, but on playback there is now a new exception:

                  Click image for larger version

Name:	log1.png
Views:	116
Size:	40.7 KB
ID:	253178

                  I tried the Locator "name" and "id" but both gave the same error.

                  Comment


                    #10
                    You're hitting a few "new" issues because it's not typical to have isc defined with AutoTest not loaded, but we've corrected additional detection code so that the problem you described above should be avoided. The fix has been applied to SGWT 6.1p/SC 11.1p and newer releases, and will be in the nightly builds dated 2018-05-14 and beyond.

                    Comment


                      #11
                      Hi Isomorphic,

                      but that is the correct approach to test an application with a plain HTML login page (plus FileLoader servlet, as here), correct?

                      Best regards
                      Blama

                      Comment


                        #12
                        We document that the FileLoader module can used in such a situation to cache JS, image files, etc., but evidently it's not a typical test situation because the issue reported by the OP has been present since 2010 and never reported.

                        In any event, it should be resolved now.

                        Comment

                        Working...
                        X