Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Ashwini Kumar
    @ashkumar567_twitter
    Any suggestion is welcome
    Kevin Roulleau
    @Kignuf
    Hello, I would like to know if phantomjs shares localstorage accross various instances of the browser ?
    Pavlista-nicus
    @Pavlista-nicus
    @ashkumar567_twitter
    ```
    @ashkumar567_twitter
        it(value.domain + ' should return all window handles', function () {
            windowHandles = browser.windowHandles()
            console.log(windowHandles.value[0]);
            console.log(windowHandles.value[1]);
        });
    
        it(value.domain + ' should switch tab to Orion', function () {
            browser.switchTab(windowHandles.value[1]);
        });
    
        it(value.domain + ' should resize the Orion window to 1200 x 768 px', function () {
            browser.setViewportSize({
                width: 1200,
                height: 768
            });
        });
    its done by using webdriver.io, you need to find simmilar hooks on phantom, but this one for sure works
    Mihai A.
    @amihaiemil
    Chrome 59 has been released recently. It can be run headlessly, which means it can replace phantomJS in automates UI tests with Selenium, for instance
    Mihai A.
    @amihaiemil
    I wrote about configuring Chrome Headless with Selenium on Travis CI here: http://www.amihaiemil.com/2017/07/14/selenium-headless-chrome-travis.html
    Balaji R
    @sch00lb0y
    
    var page = require('webpage').create();
    var system = require('system');
    
    page.onInitialized = function() {
        page.onCallback = function(data) {
            console.log('Main page is loaded and ready');
            //Do whatever here
        };
    
        page.evaluate(function() {
            document.addEventListener('DOMContentLoaded', function() {
                window.callPhantom();
            }, false);
            console.log("Added listener to wait for page ready");
        });
    
    };
    
    page.open('https://vtopbeta.vit.ac.in/vtop/', function(status) {});
    phantomjs --ignore-ssl-errors=true index.js
    https://vtopbeta.vit.ac.in/vtop/ is not triggering the callback. please help me in this
    xJustx
    @xJustx
    Hey. Someone here?
    Andrew Powell
    @shellscape
    hey folks, wanted to share something I just published https://www.npmjs.com/package/mocha-chrome
    similar to mocha-phantomjs, but uses headless chrome via chrome-launcher, chrome-remote-interface, and sorcery
    Maggie Jones Savovska
    @maggiesavovska
    @shellscape: Thanks. Do you know how to install headless chrome on linux centos?
    Mihai A.
    @amihaiemil
    @maggiesavovska it's chrome > v59. So just google how to install latest chrome
    Malay Ladu
    @malayladu

    Hello..

    Is anyone using Manet with PhantomJS?

    matrixbot
    @matrixbot
    dare-to-recurse Hello
    dare-to-recurse Does anyone know if it's possible to somehow specify which version of the pdf standard that phantomjs outputs? It seems to generate version 1.4, however we have a third party who require that the files we send them are using version 1.3.
    danielgecko
    @danielgecko
    Does anyone have any suggestions as to what I could do to test a react app using phantomJS? When I run my tests using phantom they all fail but using chromeDriver works fine. It seems like pahntomJS doesn't support the react components and therefore it cannot see the site for testing.
    Mihai A.
    @amihaiemil
    @danielgecko you could try headless chrome with selenium?
    danielgecko
    @danielgecko
    @amihaiemil Thanks, that is what I ended up doing
    underscore05
    @underscore05
    Hello, I just wanted to know if phantomjs has an available function so I can pre-process the file before being processed by phantomjs.
    I wanted to change from <script src="https://somecdn.com/app.js"></script> to <script src="http://localhost/app.js"></script>.
    2XL
    @2XL

    Hello, I want to understand the following behaviour:
    I'm using phantomjs and selenium to render local html file
    such as file://path/to/index.html

    with index.thml

    <head>
    
    </head>

    why does
    (Pdb++) self.driver.page_source
    u'<html><head><title>\n\n</title></head><body></body></html>'

    ...

    how can I prevent the driver to fill the page_source with `html head title body?

    :coffee:

    Mihai A.
    @amihaiemil
    I'm not sure it is possible? Since <head></head> is not a valid HTML document, I guess phantomJS automatically renders an empty, valid, HTML
    2XL
    @2XL
    @amihaiemil Thanks for the reply
    RenuRai
    @RenuRai
    Hi, any soultion to following issue?
    [DEBUG] Network - Resource request error: QNetworkReply::NetworkError(OperationCanceledError) ( "Operation canceled" ) URL: "myurl"
    Dustin Graves
    @dustingraves
    I am getting this issue:
    PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
      ReferenceError: Can't find variable: Map
      at webpack:///node_modules/chai-enzyme/build/index.js:93:0 <- tests/test-bundler.js:90992
    PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
      ReferenceError: Can't find variable: Map
      at webpack:///node_modules/chai-enzyme/build/index.js:93:0 <- tests/test-bundler.js:90992
    I have seen a few things about es6 shims but I haven't had any issues with this until recently
    Mikki
    @Fifoo
    @dustingraves I am not sure you are going to get a proper response (you can see the last post is over 4 months ago), this might have todo with PhantomJS being discontinued.
    Chromium supports headless now. (-->Puppeteer)
    Dustin Graves
    @dustingraves
    @Fifoo I was able to solve my problem 2 ways, 1 way is is importing Set and Map from core-js and the other is babel-polyfill.
    Thanks for the follow up
    The chromium things looks good though
    soori1s
    @soori1s
    Hi, can anyone please helpme on how to turn off the interactive mode of the Phantomjs ?
    oli
    @functionsarefun_twitter
    Hey guys, I'm trying to load some fonts into phantomjs for pdf creation. I'd appreciate if some of you pros would have a look at this: https://stackoverflow.com/questions/52868721/correct-path-for-font-src-url-in-phantomjs
    Gianina Vallejo
    @giavallejo_twitter
    Hi
    Good day
    I would like to know how I can put a footer with phantom in sails.js
    I got this error

    TypeError: phantom.callback is not a function
    at C:\Users\gvallejo\Documents\GitHub\mib-api-zoho-crm\MIB_ZOHO_CRM\api\controllers\claims\generate-worksheet.js:113:23
    at

    <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)

    footer: {
    height: "3cm",
    contents: phantom.callback(
    function(pageNum, numPages) {
    return("Header: "+pageNum+"/"+numPages);
    }
    )
    }
    Duc Le
    @ducle91
    hi all quick question, I'm trying to loop thru multiple site but I can't seem to get it to work. Here is the snippet
    for(let i = 0; i < urls.length; i++) {
      var path = urls[i].domain + urls[i].path;  
    
      // request page
      page.open(path, function (status) {
        console.log('STATUS: ', status);
        if (status === 'success') {
          var plainText = page.plainText;
          console.log(plainText);
          // check if term exist on this page
        } else {
          console.log('page failed to load');
        }
        phantom.exit();
      });
     }
    phantomjs would just hang when I run this code
    Ashutosh Narang
    @Survivor75

    I am using PhantomJS and Selenium Scala driver

    val submitBtn: WebElement = driver.findElement(By.xpath(".//*[@value=‘FOO']"))
    
    submitBtn.sendKeys(Keys.ENTER) 
    /*
    Failing at the line above
    */

    Got this error

    "message": "'undefined' is not a function (evaluating '_getTagName(currWindow).toLowerCase()')"
    aakshaik2
    @aakifshaikh
    need help to troubleshoot this error- I am installing the PhantomJS in Kali Linux machine. Followed the step from this site: https://gist.github.com/julionc/7476620. Upon checking the version it gives me error.
    error screenshot.png
    aakshaik2
    @aakifshaikh
    I tried 3 methods- 1) added export openssl_config =/etc/ssl/ on line 20- with this method now I get the below error
    error screeshot_1.png
    2) Tried in a different OS (ParrotSec) and get the same error
    aakshaik2
    @aakifshaikh
    3) Tried to change some parameters in the config- still didnt work