Results 1 to 3 of 3

Thread: PhantomJS and Webdriver

    You found a bug! We've classified it as ORION-1159 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Jun 2013
    Posts
    21

    Default PhantomJS and Webdriver

    Hi,

    Sencha FAQ stated that to use STC with PhantomJS one would just use webdriver. There was no further elaboration. I tried running phantomjs with --webdriver and also making it a selenium node in a grid, but to no avail. What happens is that stc just waits for a response. PhantomJS running with --webdriver shows nothing interesting. As a selenium node it says it tries this and that but ultimately stc doesn't think anything is coming back and times out after 120 sec.

    Has anyone from Sencha or outside made stc work with phantomjs? Or any headless browser? It seems to me that it is more likely in the integration with CLI people would have phantomjs (especially since we are working with jasmine here) than a browser farm setup.

    Thanks.

  2. #2
    Sencha User vojtech.cerveny's Avatar
    Join Date
    Jun 2015
    Location
    Ostrava, Czech republic
    Posts
    52

    Default

    Hi gzhong,
    today I tried set up phantomJs and I am able to run test from SenchaTest in phantomJs.

    You need add new WebGeneric pool to your workspace, then add new browser to your pool (HtmlUnit), rename HtmlUnit to phantomjs. Save it and restart your SenchaTest. Then you should be able to run your test in phantomjs (of course, webdriver should run ).

    You can set it in SenchaTest as I described, or edit your workspace.
    workspace.json
    Code:
    "browser": {
                "farms": [
                    {
                        "name": "localFarm",
                        "type": "generic",
                        "host": "localhost",
                        "port": 4444,
                        "sessionLimit": 3,
                        "sessionCount": 0,
                        "pools": [
                            {
                                "name": "phantomjs",
                                "path": "test/farms/phantomjs.json"
                            }
                        ]
                    }
                ]
            },
    test/farms/phantom.json
    Code:
    [
        {
            "browserName": "phantomjs",
            "sencha": {
                "concurrency": 1
            },
            "platform": "ANY"
        }
    ]
    And I use selenium-standalone .

    Feel free to contact me any time.
    Vojtěch
    “Testers don’t like to break things; they like to dispel the illusion that things work.”— Kaner, Bach, Pettichord

  3. #3
    Sencha User
    Join Date
    Jun 2013
    Posts
    21

    Default

    Thank you. I forgot to mention that phantomjs seems to work with Sencha Studio (that's the fancy test program). My difficulty is running stc, the commandline version. Does it work with you on commandline? It doesn't for Windows or Mac. The way I ran it was:

    stc run -s test/unit -p phantomjs

    Where phantomjs is a pool set up similarly to what you described above and, again, it works with Sencha Studio.

    Thanks!

Similar Threads

  1. Replies: 4
    Last Post: 14 Aug 2013, 5:01 PM
  2. WebDriver GXT help
    By darkling235 in forum Sencha GXT Q&A
    Replies: 4
    Last Post: 23 Jul 2013, 12:17 PM
  3. Newbie question on test automation using Selenium (WebDriver)
    By bchock in forum Sencha Touch 2.x: Q&A
    Replies: 0
    Last Post: 6 Aug 2012, 5:46 AM
  4. Detect page/view render completed - WebDriver
    By cbobo in forum Sencha Touch 2.x: Q&A
    Replies: 1
    Last Post: 23 Feb 2012, 12:02 PM
  5. GXT with WebDriver
    By cormet in forum Ext GWT: Discussion
    Replies: 5
    Last Post: 9 Sep 2010, 8:43 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •