Announcement

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

  • Error while initialising SmartClientChromeDriver in selenium 3.14 using SmartClientv10 isomorphic_webdriver.jar

    Hi Team,

    I have an application which is developed using SmartClientv10. So I took isomorphic_webdriver.jar from *\SmartClient_v100p_2018-10-05_LGPL\smartclientSDK\WEB-INF\lib-WebDriverSupport.
    I have added it as referenced lib in eclipse with selenium 3.14.

    Starting ChromeDriver 2.42.591088 (7b2b2dca23cca0862f674758c9a3933e685c27d5) on port 32113
    Only local connections are allowed.
    Oct 16, 2018 6:12:22 PM org.openqa.selenium.remote.ProtocolHandshake createSession
    INFO: Detected dialect: OSS
    Exception in thread "main" java.lang.ClassCastException: org.openqa.selenium.MutableCapabilities cannot be cast to org.openqa.selenium.remote.DesiredCapabilities
    at com.isomorphic.webdriver.SmartClientWebDriver.<init>(SmartClientWebDriver.java:82)
    at com.isomorphic.webdriver.SmartClientChromeDriver.<init>(SmartClientChromeDriver.java:43)
    at facebook.TestFBRegistration_Chrome.main(TestFBRegistration_Chrome.java:24)
    Please find attached code and error.
    Attached Files

  • #2
    Can someone please look into this. This is a blocker for me.

    Comment


    • #3
      SmartClient v10 isn't compatible with Selenium 3. You'll need to upgrade to Smartclient v12 to use Selenium 3. In general, isomorphic_webdriver.jar is only compatible with the Selenium JAR versions shipped with it in the lib-WebDriverSupport directory.
      Last edited by Isomorphic; 22nd Oct 2018, 08:08.

      Comment


      • #4
        Used all the libraries shipped with SmartClient v10. Was able to run the above attached webdriver code.

        I don't want to manually copy the scLocator object recorded using selenium IDE in webdriver. I wish to use seleneserunner shipped by isomorphic, for converting my recorded testcase to java code. But i m getting error.

        My assumptions -
        unitTest.java --> file which will be created with java code
        http://192.168.109.121:18217/examinWeb/DummyLogin.jsp --> my application url
        SELENIUM_IDE.rctest.html --> testcase which is recorded using selenium ide with user-extension.js.

        Please correct if I have done anything wrong.


        Error -

        E:\Softwares\SmartClient_v100p_2018-10-05_LGPL\SmartClient_v100p_2018-10-05_LGPL\smartclientSDK\WEB-INF\lib-WebDriverSupport>java -cp "*" com.isomorphic.webdriver.SeleneseRunn
        er -s unitTest.java "http://192.168.109.121:18217/examinWeb/DummyLogin.jsp" "SELENIUM_IDE.rctest.html"
        baseUrl: http://192.168.109.121:18217/examinWeb/DummyLogin.jsp
        org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
        ":["Mozilla Contributors"]},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"descriptor":"C:\\Program Files\\Mozilla Firefox\\browser\\extensions\\{972ce
        4c6-7e08-4474-a285-3208198ce6fd}.xpi","installDate":1488542376000,"updateDate":1488542376000,"applyBackgroundUpdates":1,"skinnable":true,"size":19581,"sourceURI":null,"release
        NotesURI":null,"softDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"strictCompatibility":true,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f
        -9b0e-13a3a9e97384}","minVersion":"52.0","maxVersion":"52.0"}],"targetPlatforms":[],"seen":true,"dependencies":[],"hasEmbeddedWebExtension":false}
        1540198488906 addons.xpi DEBUG getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd}
        1540198488908 DeferredSave.extensions.json DEBUG Save changes
        1540198488908 addons.xpi DEBUG Updating database with changes to installed add-ons
        1540198488908 addons.xpi-utils DEBUG Updating add-on states
        1540198488910 addons.xpi-utils DEBUG Writing add-ons list
        1540198488919 addons.xpi DEBUG Registering manifest for C:\Program Files\Mozilla Firefox\browser\features\aushelper@mozilla.org.xpi
        1540198488920 addons.xpi DEBUG Calling bootstrap method startup on aushelper@mozilla.org version 2.0
        1540198488924 addons.xpi DEBUG Registering manifest for C:\Program Files\Mozilla Firefox\browser\features\e10srollout@mozilla.org.xpi
        1540198488926 addons.xpi DEBUG Calling bootstrap method startup on e10srollout@mozilla.org version 1.9
        1540198488927 addons.xpi DEBUG Registering manifest for C:\Program Files\Mozilla Firefox\browser\features\firefox@getpocket.com.xpi
        1540198488928 addons.xpi DEBUG Calling bootstrap method startup on firefox@getpocket.com version 1.0.5
        1540198488929 addons.xpi DEBUG Registering manifest for C:\Program Files\Mozilla Firefox\browser\features\webcompat@mozilla.org.xpi
        1540198488930 addons.xpi DEBUG Calling bootstrap method startup on webcompat@mozilla.org version 1.0
        1540198488933 addons.manager DEBUG Registering shutdown blocker for XPIProvider
        1540198488934 addons.manager DEBUG Provider finished startup: XPIProvider
        1540198488934 addons.manager DEBUG Starting provider: LightweightThemeManager
        1540198488934 addons.manager DEBUG Registering shutdown blocker for LightweightThemeManager
        1540198488934 addons.manager DEBUG Provider finished startup: LightweightThemeManager
        1540198488935 addons.manager DEBUG Starting provider: GMPProvider
        1540198488958 addons.manager DEBUG Registering shutdown blocker for GMPProvider
        1540198488958 addons.manager DEBUG Provider finished startup: GMPProvider
        1540198488958 addons.manager DEBUG Starting provider: PluginProvider
        1540198488959 addons.manager DEBUG Registering shutdown blocker for PluginProvider
        1540198488959 addons.manager DEBUG Provider finished startup: PluginProvider
        1540198488960 addons.manager DEBUG Completed startup sequence
        1540198491224 addons.manager DEBUG Starting provider: <unnamed-provider>
        1540198491225 addons.manager DEBUG Registering shutdown blocker for <unnamed-provider>
        1540198491226 addons.manager DEBUG Provider finished startup: <unnamed-provider>
        1540198491387 DeferredSave.extensions.json DEBUG Write succeeded
        1540198491387 addons.xpi-utils DEBUG XPI Database saved, setting schema version preference to 19
        1540198491387 DeferredSave.extensions.json DEBUG Starting timer
        1540198491409 DeferredSave.extensions.json DEBUG Starting write
        1540198491424 addons.repository DEBUG No addons.json found.
        1540198491425 DeferredSave.addons.json DEBUG Save changes
        1540198491438 DeferredSave.addons.json DEBUG Starting timer
        1540198491772 addons.manager DEBUG Starting provider: PreviousExperimentProvider
        1540198491773 addons.manager DEBUG Registering shutdown blocker for PreviousExperimentProvider
        1540198491773 addons.manager DEBUG Provider finished startup: PreviousExperimentProvider
        1540198491777 DeferredSave.addons.json DEBUG Starting write
        1540198491801 DeferredSave.extensions.json DEBUG Write succeeded
        1540198491861 DeferredSave.addons.json DEBUG Write succeeded

        at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:122)
        at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:276)
        at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:116)
        at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:223)
        at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:216)
        at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:212)
        at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:129)
        at com.isomorphic.webdriver.SmartClientFirefoxDriver.<init>(SmartClientFirefoxDriver.java:59)
        at com.isomorphic.webdriver.SmartClientFirefoxDriver.<init>(SmartClientFirefoxDriver.java:65)
        at com.isomorphic.webdriver.SeleneseRunner.parseEntry(SeleneseRunner.java:253)
        at com.isomorphic.webdriver.SeleneseRunner.main(SeleneseRunner.java:210)
        Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/jna/platform/win32/Kernel32
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at org.openqa.selenium.os.ProcessUtils.killWinProcess(ProcessUtils.java:133)
        at org.openqa.selenium.os.ProcessUtils.killProcess(ProcessUtils.java:81)
        at org.openqa.selenium.os.UnixProcess$SeleniumWatchDog.destroyHarder(UnixProcess.java:247)
        at org.openqa.selenium.os.UnixProcess$SeleniumWatchDog.access$2(UnixProcess.java:246)
        at org.openqa.selenium.os.UnixProcess.destroy(UnixProcess.java:125)
        at org.openqa.selenium.os.CommandLine.destroy(CommandLine.java:153)
        at org.openqa.selenium.firefox.FirefoxBinary.quit(FirefoxBinary.java:259)
        at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.quit(NewProfileExtensionConnection.java:204)
        at org.openqa.selenium.firefox.FirefoxDriver$LazyCommandExecutor.quit(FirefoxDriver.java:377)
        at org.openqa.selenium.firefox.FirefoxDriver.stopClient(FirefoxDriver.java:323)
        at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:119)
        at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:223)
        at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:216)
        at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:212)
        at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:129)
        at com.isomorphic.webdriver.SmartClientFirefoxDriver.<init>(SmartClientFirefoxDriver.java:59)
        at com.isomorphic.webdriver.SmartClientFirefoxDriver.<init>(SmartClientFirefoxDriver.java:65)
        at com.isomorphic.webdriver.SeleneseRunner.parseEntry(SeleneseRunner.java:253)
        at com.isomorphic.webdriver.SeleneseRunner.main(SeleneseRunner.java:210)
        Caused by: java.lang.ClassNotFoundException: com.sun.jna.platform.win32.Kernel32
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 31 more

        Comment


        • #5
          Are you trying to convert your Selenese to Java or execute it? If you just want to convert it, you should omit the "baseUrl" argument.

          Comment

          Working...
          X