Announcement

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

    Selenium : Exception while accessing browser using SmartClientFirefoxDriver

    Hi Isophormic,

    While trying Automation using Selenium, we are facing issues using webdriver, could you please help us to resolve it.


    Sample Code :
    SmartClientFirefoxDriver scff=new SmartClientFirefoxDriver();
    scff.get("http:/localhost:8080/UDMUI/login/login.jsp");


    While executing system appends "null" in URL(Attached screenshot for reference) and throws below exception and we are unable to find any topic around it.

    Exception in thread "main" org.openqa.selenium.WebDriverException: Component returned failure code: 0x804b0012 (NS_ERROR_UNKNOWN_PROTOCOL) [nsIWebNavigation.loadURI]
    Command duration or timeout: 5.26 seconds
    Build info: version: '2.34.0', revision: '11cd0ef93615408e0b6b3bfa28defe125906461a', time: '2013-08-06 11:43:14'
    System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_131'
    Driver info: org.openqa.selenium.firefox.FirefoxDriver
    Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=22.0, platform=XP, browserConnectionEnabled=true, nativeEvents=true, acceptSslCerts=true, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
    Session ID: 250b8431-6ca8-4348-a950-4506671e19d3
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:191)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
    at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:276)
    at com.isomorphic.webdriver.SmartClientWebDriver.get(SmartClientWebDriver.java:266)
    at POC.main(POC.java:22)
    Caused by: org.openqa.selenium.remote.ErrorHandler$UnknownServerException: Component returned failure code: 0x804b0012 (NS_ERROR_UNKNOWN_PROTOCOL) [nsIWebNavigation.loadURI]
    Build info: version: '2.34.0', revision: '11cd0ef93615408e0b6b3bfa28defe125906461a', time: '2013-08-06 11:43:14'
    System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_131'


    **************************
    Environment Detail:

    Development : licensed version of SmartGWT PRO 4.1

    Selenium : smartgwtee-4.1p/lib-WebDriverSupport/isomorphic_webdriver.jar and selenium-server(2.34) provided along with Smart GWT

    Firefox : Version 22 ( we tried multiple firefox version e.g 35,41,58 etc) but facing same issue

    Attached Files

    #2
    Currently for SGWT 4.1p/SC 9.1p, you'd need to call scif.setBaseUrl() with a valid string to avoid "null" being prepended to the address you passed to get(), but we'll go ahead and port back a fix for this. The get() was originally intended to allow you to open a page relative to a base URL.

    Comment


      #3
      Thanks for your reply and providing Alternative solution.

      we are able to hit URL page with setBaseURL()


      we have recorded few clicks on firefox browser using IDE and tried to replay the events However while clicking on a tree object and Button, Replay is failing each time on firefox (version 22) with below exception

      could you please help me to resolve the issue

      TestCase on IDE
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
      <head profile="http://selenium-ide.openqa.org/profiles/test-case">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      <link rel="selenium.base" href="http://localhost:8080/" />
      <title>New Test</title>
      </head>
      <body>
      <table cellpadding="1" cellspacing="1" border="1">
      <thead>
      <tr><td rowspan="1" colspan="3">New Test</td></tr>
      </thead><tbody>
      <tr>
      <td>open</td>
      <td>/UDMUI/secure/main.jsp</td>
      <td></td>
      </tr>
      <tr>
      <td>waitForElementClickable</td>
      <td>scLocator=//autoID[Class=HLayout||index=0||length=3||classIndex=0||classLength=1]/member[Class=VLayout||index=0||length=2||classIndex=0||classLength=1]/member[Class=HLayout||index=0||length=1||classIndex=0||classLength=1]/member[Class=VStack||index=0||length=2||classIndex=0||classLength=1]/member[Class=SectionStack||index=0||length=1||classIndex=0||classLength=1]/section[Class=SectionHeader||index=2||length=7||classIndex=2||classLength=7||roleIndex=2||roleLength=7||title=Security%20Master||scRole=heading||name=isc_Class_S210_2]/item[Class=VLayout||index=0||length=1||classIndex=0||classLength=1]/member[Class=TreeGrid||index=0||length=1||classIndex=0||classLength=1||roleIndex=0||roleLength=1||scRole=tree]/body/row[1]/col[fieldName=nodeTitle||0]</td>
      <td></td>
      </tr>
      <tr>
      <td>click</td>
      <td>scLocator=//autoID[Class=HLayout||index=0||length=3||classIndex=0||classLength=1]/member[Class=VLayout||index=0||length=2||classIndex=0||classLength=1]/member[Class=HLayout||index=0||length=1||classIndex=0||classLength=1]/member[Class=VStack||index=0||length=2||classIndex=0||classLength=1]/member[Class=SectionStack||index=0||length=1||classIndex=0||classLength=1]/section[Class=SectionHeader||index=2||length=7||classIndex=2||classLength=7||roleIndex=2||roleLength=7||title=Security%20Master||scRole=heading||name=isc_Class_S210_2]/item[Class=VLayout||index=0||length=1||classIndex=0||classLength=1]/member[Class=TreeGrid||index=0||length=1||classIndex=0||classLength=1||roleIndex=0||roleLength=1||scRole=tree]/body/row[1]/col[fieldName=nodeTitle||0]</td>
      <td></td>
      </tr>



      ERROR

      [error] Unexpected Exception: TypeError: autWindow is undefined. fileName -> chrome://selenium-ide/content/tools.js -> file:///E:/svn.dclear.com/UDM/trunk/Tools/UIAutomation/Dependancies/smartgwtee-eval-4.1p/smartgwtee-4.1p/selenium/user-extensions.js?1518774035986, lineNumber -> 89, columnNumber -> 0


      Attached screenshot for more details.
      Attached Files

      Comment


        #4
        You're using a very old release of SmartClient, as well as an End-of-Lifed Firefox version and Selenium JARs. There are too many unknowns. You'll need to upgrade to a more recent SmartClient release, preferably SC 11.1p, before we can investigate, unless you want to pursue paid support.

        You can download evaluation versions of SmartClient here
        Last edited by Isomorphic; 19 Feb 2018, 15:04.

        Comment


          #5
          Hi we have tried on latest release of build and facing below issue in implementation, could you please help us in resolving it

          Environment :

          * Application built using smartgwt-6.1p
          * Firefox version : 47.0.2 ( as latest version has issue for IDE we have used 47 which is compatible to selenium 2.53
          * Selenium : 2.53.1

          Problem statement : Unable to recognize editable combo box inside Grid consistently.

          we have tried to record same object multiple time it has recorded different object each time as shown below. we have also tried regular expression on dynamic part of sclocator but replay failed to identify object during playback.

          Object : Invisible combobox inside GRID (Attached screenshot for reference)

          Recording 1 :
          scLocator=//autoID[Class=VLayout||index=3||length=5||classIndex=0||classLength=1]/member[Class=TabSet||index=0||length=1||classIndex=0||classLength=1]/paneContainer/member[Class=VLayout||index=1||length=2||classIndex=0||classLength=1]/member[Class=SectionStack||index=0||length=4||classIndex=0||classLength=1]/section[Class=SectionHeader||index=0||length=9||classIndex=0||classLength=9||roleIndex=0||roleLength=9||title=Instrument%20Basics||scRole=heading||name=isc_Class_S138_12]/item[Class=Portlet||index=0||length=1||classIndex=0||classLength=1||roleIndex=0||roleLength=1||scRole=dialog]/item[0][Class="HLayout"]/member[Class=ListGrid||index=1||length=2||classIndex=0||classLength=1||roleIndex=0||roleLength=1||scRole=list]/body/row[identifierId=-97614||identifierTypeId=||0]/col[fieldName=identifierTypeId||1]

          Recording 2 :
          scLocator=//autoID[Class=VLayout||index=3||length=5||classIndex=0||classLength=1]/member[Class=TabSet||index=0||length=1||classIndex=0||classLength=1]/paneContainer/member[Class=VLayout||index=1||length=2||classIndex=0||classLength=1]/member[Class=SectionStack||index=0||length=4||classIndex=0||classLength=1]/section[Class=SectionHeader||index=0||length=9||classIndex=0||classLength=9||roleIndex=0||roleLength=9||title=Instrument%20Basics||scRole=heading||name=isc_Class_S138_2]/item[Class=Portlet||index=0||length=1||classIndex=0||classLength=1||roleIndex=0||roleLength=1||scRole=dialog]/item[0][Class="HLayout"]/member[Class=ListGrid||index=1||length=2||classIndex=0||classLength=1||roleIndex=0||roleLength=1||scRole=list]/body/row[identifierId=-5276||identifierTypeId=||0]/col[fieldName=identifierTypeId||1]


          Could you please help on how to handle above problem
          Attached Files

          Comment


            #6
            The "name" part of the locator that varies is an auto-assigned ID for a SectionHeader, and it doesn't matter if it changes as the header can still be found by title or position.

            The identifierId indicates that the primaryKey of the record is different each time - this is your own data problem. The locator will fall back to using the row index, which is 0 in both cases.

            So there's no indication of any kind of framework issue here, and we have no way of reproducing this problem. If you nevertheless suspect a framework issue, you could try taking one of our grid samples and adding a comboBox as an editor field, and getting the locator and attempting to interact via Selenium. You should find that this works.

            Comment


              #7
              Hi Isomorphic,

              Could you please explain charges for Paid Support ?

              Email Id : Pratik.Thaker@smartstreamrdu.com

              Comment

              Working...
              X