1. Browser-Launcher自動化瀏覽器測試工具

        聯(lián)合創(chuàng)作 · 2023-09-23 03:27

        Browser-Launcher可以檢測系統(tǒng)上的所有瀏覽器版本,并在一個獨立的配置文件中啟動它們,用于自動測試。

        示例代碼:

        var launcher = require('launcher');
        launcher(function (err, launch) {
            if (err) return console.error(err);
        
            console.log('# available browsers:');
            console.dir(launch.browsers);
        
            var opts = {
                headless : true,
                browser : 'chrome',
                proxy : 'localhost:7077',
            };
            launch('http://substack.net', opts, function (err, ps) {
                if (err) return console.error(err);
            });
        });
        $ node example/launch.js 
        # available browsers:
        { local: 
           [ { name: 'chrome',
               re: {},
               type: 'chrome',
               profile: '/home/substack/.config/browser-launcher/chrome-17.0.963.12_9c0bdd8d',
               command: 'google-chrome',
               version: '17.0.963.12' },
             { name: 'chromium',
               re: {},
               type: 'chrome',
               profile: '/home/substack/.config/browser-launcher/chromium-18.0.1025.168_e025d855',
               command: 'chromium-browser',
               version: '18.0.1025.168' },
             { name: 'phantom',
               re: {},
               type: 'phantom',
               headless: true,
               profile: '/home/substack/.config/browser-launcher/phantom-1.4.0_31767fa2',
               command: 'phantomjs',
               version: '1.4.0' },
             { name: 'firefox',
               re: {},
               type: 'firefox',
               profile: [Object],
               command: 'firefox',
               version: '12.0' } ] }
        瀏覽 23
        點贊
        評論
        收藏
        分享

        手機掃一掃分享

        編輯 分享
        舉報
        評論
        圖片
        表情
        推薦
        點贊
        評論
        收藏
        分享

        手機掃一掃分享

        編輯 分享
        舉報
          
          

            1. 插插看 | 高清欧美日韩视频一区二区欧美成人精品 | av啪啪漫画羞羞汗汗sss | 国产精品毛片一区视频播不卡 | 91精品区 |