でプロキシを使用します。 Playwright

Playwrightを使ったテスト自動化のための常駐型プロキシとモバイルプロキシを設定する方法について説明します。
プラン選択 3日間のトライアル - セットアップ費用は不要 - いつでもキャンセル可能
価格
Playwright
  1. To use Playwright and set up your proxies you need to paste this code example
     const playwright = require('@playwright/test');
     const launchOptions = {
         proxy: {
             server: 'proxy.froxy.com:9000',
             username: 'login',
             password: 'password'
         }
     };
     (async () => {
         const defaultBrowser = await playwright['chromium'].launch({});
         const context = await defaultBrowser.newContext();
         const page = await context.newPage();
         await page.goto('https://froxy.com/api/detect-ip');
         console.log('chromium without proxy:', await page.textContent("*"));
         await defaultBrowser.close();
    
         for (const browserType of ['chromium', 'firefox', 'webkit']) {
             const browser = await playwright[browserType].launch(launchOptions);
             const context = await browser.newContext();
             const page = await context.newPage();
             try {
                 await page.goto('https://froxy.com/api/detect-ip');
                 console.log(`${browserType} with proxy:`, await page.textContent("*"));
             } catch (e) {
                 console.log(e);
             }
             await browser.close();
         }
     })();
    
  2. Please, add proxy config in playwright.config.ts use section
  3. You can get all information concerning server/port, login and password in your Froxy Dashboard
For additional info you can visit Playwright development portal.

今すぐフロキシーを試す

フロキシー社のプロキシは、目標達成を可能にする最も人気のあるツールに適合しています!

今すぐプロキシをお試しください。アカウントを作成し、レートを選択し、開始してください。

今すぐスタート