Announcement

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

    How to start with Selenium 3

    Hi Isomorphic,

    We are about to integrate Automated Testing in our Environment. You introduced Selenium 3 + WebDriver with the new realease of SmartGWT 12. After reading the Docs about AutomatedTesting, UsingSelenium and their subchapters i saw that there is nothing said about Selenium 3 + WebDriver. I also read several posts in this forum about the topics. You mentioned not to use Selenium 2 + WebDriver because of issues with the SCLocator. Instead it was recommended to use the deprecated Selenium RC +JUnit. What would you recommand to use at this point?

    If i do not use the SeleniumRC approach, is it still possible to use the Selenium IDE browser extension (version >= 3.0.1) for creating tests and use them with WebDriver? I ask because its mentioned to use the following extensions:
    • user-extensions.js
    • user-entensions-ide.js
    How can I use these with Selenium IDE (version >= 3.0.1) or is it even necessary at all?

    If using Selenium 2 or 3 + WebDriver is it possible to combine self written tests with the IDE?

    Are there any new docs comming soon about how to use Selenium 3? As i saw, the current ones are still the same than in SmartGWT 6.1.


    Thanks in advance!

    Best regards

    #2
    Originally posted by Developer12145 View Post
    Hi Isomorphic,

    We are about to integrate Automated Testing in our Environment. You introduced Selenium 3 + WebDriver with the new realease of SmartGWT 12. After reading the Docs about AutomatedTesting, UsingSelenium and their subchapters i saw that there is nothing said about Selenium 3 + WebDriver. I also read several posts in this forum about the topics. You mentioned not to use Selenium 2 + WebDriver because of issues with the SCLocator. Instead it was recommended to use the deprecated Selenium RC +JUnit. What would you recommand to use at this point?
    The official guidance is to still write Selenese via Selenium IDE which TestRunner can execute, but we also support Java code written directly against our SmartClientWebDriver wrapper around WebDriver. You shouldn't be affected significantly by the shift to Selenium 3, except where Selenium bugs (below our layer) have been introduced that didn't exist in Selenium 2. You can continue to use TestRunner to run Selenese and the SmartClientWebDriver wrapper to run Java directly against WebDriver.

    In SGWT 12.0p+/SC 12.0p+, since the Selenium 3 JARs don't support user extensions, we execute Selenese using SeleneseRunner, an emulator that executes Selenese line-by-line calling APIs in SmartClientWebDriver. You shouldn't have to worry about this change as the officially recommended way of running Selenese, TestRunner, hasn't changed. However, if you were running your Selenese directly against the Selenium 1-2 JARs, you'll need to switch to SeleneseRunner.

    Originally posted by Developer12145 View Post

    If i do not use the SeleniumRC approach, is it still possible to use the Selenium IDE browser extension (version >= 3.0.1) for creating tests and use them with WebDriver? I ask because its mentioned to use the following extensions:
    • user-extensions.js
    • user-entensions-ide.js

    How can I use these with Selenium IDE (version >= 3.0.1) or is it even necessary at all?
    Selenium IDE is a separate tool which doesn't use any of the Selenium JARs, but which is required to write Selenese, and also to generate scLocators even if you're writing Java code for our WebDriver wrappers. Unfortunately, the new Selenium IDE you mention, designed for Firefox Quantum, doesn't support the same JavaScript extension files as previous versions. So the recommendation for now is to use Selenium IDE 2.9 with Firefox 52 ESR which will still be supported with security updates untul 9/5/2018.

    The Selenium IDE project on GitHub has just now (literally hours ago), released a new version with support for plugins that can potentially allow us to write support for our custom commands and locators. However, these will look completely different from our existing JS user extensions, so it will be some time before we can offer support for it - assuming the plugins are capable enough for what we need to do. From your point of view, there will be no advantage except that you won't have to user Firefox ESR - the Selenese generated shouldn't be any different.

    Originally posted by Developer12145 View Post
    If using Selenium 2 or 3 + WebDriver is it possible to combine self written tests with the IDE?
    Can you clarify your question? As mentioned, you can still write or modify Selenese - you'll just need to use Firefox 52 ESR until the transition to Selenium IDE 3's plugins is complete.


    Originally posted by Developer12145 View Post
    Are there any new docs comming soon about how to use Selenium 3? As i saw, the current ones are still the same than in SmartGWT 6.1.
    As mentioned, you shouldn't have to make any major changes if you were using TestRunner or SmartClientWebDriver in SGWT 6.1p/SC 11.1p:
    • If you're writing Selenese scripts, you can continue to use Selenium IDE, though you'll need to use it in Firefox 52 ESR for now as it's not compatible with Firefox Quantum. Eventually, we hope that the just-releasted plugin feature of Selenium IDE 3 will allow us to write plugins that do the same things as our JS user extensions in Selenium IDE 2.x
    • When running Selenese, if you were using our TestRunner tool, there's nothing to do. If you were directly using the Selenium 1-2 JARs, you'll need to instead switch to our SeleneseRunner tool which will execute them via emulation.
    • If you have WebDriver Java based on our SmartClientWebDriver APIs, there's also nothing to do, though you may face bugs from the new underlying Selenium JARs in cases where we haven't been able to add workarounds to SmartClientWebDriver.

    The documentation will be updated to reflect all of the above.

    Comment


      #3
      Selenium IDE 2.9 with Firefox 52 ESR which will still be supported with security updates untul 9/5/2018
      Now this is not supported any more. So by when shall we expect the plugin from smartclient which will enable us to use latest selenium + firefox with proper scLocator classes to address dynamic component id creation?

      Also help me with the pointer to step by step documentation on how to use scLocator with latest selenium webdriver.
      Last edited by anshu781126; 14 Oct 2018, 21:39. Reason: also need step by step documentation of the same

      Comment


        #4
        Selenium IDE has been completely rewritten for Firefox Quantum, and lacks two important features that would permit us to port our JavaScript user extensions to it:
        • Custom locators are not yet supported. According to the project devs, this is due to a few small issues which are expected to be resolved soon, but have not yet been as of this writing.
        • Overrides of existing Selenium commands are not supported in the new Selenium IDE. We plan to go forward without this, but it may make it harder to use, since you may have to save out your script, run it through a conversion utility, and then reload it so it consists entirely of custom commands. (For example, we may prefix all built-in commands with "sc" to avoid any collision during playback.)

        You may wish to create an "issue" on the GitHub link mentioned above to report how the lack of these features is affecting you, to focus the developers' attention on the problem.

        Originally posted by anshu781126 View Post
        Also help me with the pointer to step by step documentation on how to use scLocator with latest selenium webdriver.
        There has been no change to scLocators or their usage during the transition from Selenium 2 => 3 or from Selenese scripts to SmartClientWebDriver APIs. That logic is in our AutoTest module, a component of our Framework's core.

        We're also not sure what you mean by "proper scLocator classes to address dynamic component id creation." If you're having a problem with locators not working, it's almost certainly not related to Selenium IDE and should be reported in its own thread.

        Comment


          #5
          Hello,

          Selenium IDE is now 3.16 (on chrome), since we will need to make some automated test, what's the current status? And what do you recommend?

          Best regards

          Comment


            #6
            See the Automated Testing overview and Using Selenium help topics. SGWT 12+ uses Selenium 3 and supports either execution of Selenese scripts via SeleneseRunner or WebDriver via our SmartClientWebDriver wrapper.

            Selenium IDE 3.x is not supportable because it doesn't allow for custom locators, which are used by our Selenese extensions and WebDriver wrappers. You can test/debug scripts with SeleneseRunner or our TestRunner tool, but to interactively debug you'll need to use an older (and yes unsupported) version of Firefox and run Selenium IDE 2.x.


            Comment


              #7
              Thanks for your answer Isomorphic

              The question now is : how to use Firefox 52 ESR with Selenium IDE 2.9 while already using latest FireFox (72) on the same computer? Firefox portable? Or a specific bundled version with Selenium on separated profile?

              Best regards

              Comment


                #8
                While in theory Firefox 52ESR would be ideal, we've found in our own experience that using the older 45ESR might have fewer problems. The installer should allow you to customize the installation location so it can be installed in its own location, and creating a separate profile would probably be appropriate. You should ask for help in the Mozilla forums if any of this isn't clear.

                Comment

                Working...
                X