#10 - Open Browser without Incognito Mode (Normal Mode) with Playwright

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 พ.ย. 2024

ความคิดเห็น • 13

  • @kushalparikh3608
    @kushalparikh3608 หลายเดือนก่อน

    Playwright doesn’t support maximising browser window in latest version using “- start-maximized”. Sir Can you pls check & tell is there any alternative?

  • @shanmugamvenkatachalapathy7556
    @shanmugamvenkatachalapathy7556 3 ชั่วโมงที่ผ่านมา

    Hi Naveen,
    How to open incognito mode in Javascript language.

  • @MartinsJDPower
    @MartinsJDPower 3 หลายเดือนก่อน

    Hi Naveen,
    if I use the "./session" argument within the "launchPersistentContext()", I get this error: "Error: browserType.launchPersistentContext: Target page, context or browser has been closed".
    Is there a reason for this pls?

  • @rajeshnaidu2527
    @rajeshnaidu2527 6 หลายเดือนก่อน

    @naveen can we record in non-incognito mode. if so can you let me know how can we

  • @selvaganapathye4999
    @selvaganapathye4999 8 หลายเดือนก่อน

    Hi Naveen can u help me how to replicate the same method via playwright java i tried but getting errors at launchpersistentcontext

  • @AnandTesting
    @AnandTesting 8 หลายเดือนก่อน

    please can you tell us, How to open Edge in IE mode using playwright?

    • @tranthinhqnam
      @tranthinhqnam 7 หลายเดือนก่อน

      const { chromium } = require('playwright');
      (async () => {
      const browser = await chromium.launch();
      const context = await browser.newContext({
      userAgent: 'Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; AS; rv:11.0) like Gecko',
      viewport: { width: 1366, height: 768 },
      extraHTTPHeaders: { 'Accept-Language': 'en-US,en;q=0.9' },
      bypassCSP: true,
      isMobile: false,
      javaScriptEnabled: true,
      ignoreHTTPSErrors: true,
      locale: 'en-US',
      geolocation: { longitude: 0, latitude: 0 },
      permissions: ['geolocation'],
      timezoneId: 'UTC',
      colorScheme: 'light',
      acceptDownloads: true,
      // Enable the 'msie' flag to open Edge in IE mode
      args: ['--msie']
      });
      const page = await context.newPage();
      await page.goto('example.com');
      // Continue with your testing or automation tasks
      await browser.close();
      })();

  • @sumitgoyal385
    @sumitgoyal385 8 หลายเดือนก่อน

    Hi Naveen thanx,
    I have a question here If I use await the code is working but If I apply other approach using then it is not working please help waiting for ur reply :)
    await page.locator("//div[@class='example']/h3").textContent(); //works
    page.locator("//div[@class='example']/h3").textContent().then((data)=>{

    console.log("value is ="+data);

    });

    • @naveenautomationlabs
      @naveenautomationlabs  8 หลายเดือนก่อน

      with .then(), the callback function is executed asynchronously when the promise is resolved, and there might be a timing issue where the text content is not yet available when the callback function is executed. So avoid using chaining with then(). Always use await for the right sychronization.

    • @sumitgoyal385
      @sumitgoyal385 8 หลายเดือนก่อน

      @@naveenautomationlabs thanks for your response Actually I put await before it and it worked ,the reason I used then is I was trying to relate few things related to promise

    • @naveenautomationlabs
      @naveenautomationlabs  8 หลายเดือนก่อน

      Yes use await and use catch also in order to capture the error if element is not found.

  • @SmitaVishwasPatil
    @SmitaVishwasPatil 8 หลายเดือนก่อน

    Hi Naveen ... I want join your classes...how I can join it

    • @naveenautomationlabs
      @naveenautomationlabs  8 หลายเดือนก่อน

      Please check the details here : naveenautomationlabs.com/selenium-training-batch/
      You can enroll for it from here.