Hi Naveen, I need to contact you, Is there any paid online class available for Selenium and Java?
@sheebaelizha469110 ай бұрын
Hey Naveen , Can you plz tell how to launch the browser without Incognito ? as am having issue in running few scenarios due to the browser runnimg in Inprivate mode? Is there a way or it is not possible via Playwright.. Plz help
@rasoolbasha3524Ай бұрын
I see there is a cleaner way to do this now (not sure if it is an enhancement in newer revisions) List launchOptionsArgs = new ArrayList(Arrays.asList("--start-maximized")); Browser browser = playwright.chromium().launch(new BrowserType.LaunchOptions().setHeadless(false).setArgs(launchOptionsArgs)); BrowserContext context = browser.newContext(new Browser.NewContextOptions().setViewportSize(null)); This would not need we manually checking the screensize and no scope for minor mismatches in pixel values too
@purushottamvyas33842 жыл бұрын
Hi Naveen, If we use this option, the browser window will not fit to screen. I tried using page.keyboard().press("Meta+ArrowUp"); and page.keyboard().press("F11"); but nothing happened. To my surprise even page.keyboard().press("Control+T"); also did not work. Could you please guide.
@surreshr89162 жыл бұрын
Hi I'm using web driver 5.0.1 dependencies writing webdriver driver=WebdriverManager.ChromeDrivar().setup(); After driver.get("url"); After launch browser I'm not given driver.close(); but browser automatically closed Can you check once it why it will close like this??
@yugdharmarakshak9348 Жыл бұрын
Hi naveen sir... i have tried exactly same as you said...but didn't worked for me
@arjunreddynr2 жыл бұрын
NOTE: Java awt class is giving screensize. Viewport size will be different
@shridharpp Жыл бұрын
Setting viewportsize on object of Page class worked for me. playwright version 1.17.1 Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize(); int width = (int) dimension.getWidth(); int height = (int) dimension.getHeight(); playwright = Playwright.create(); BrowserType.LaunchOptions launchOptions = new BrowserType.LaunchOptions(); launchOptions.setHeadless(false).setArgs(List.of("--start-maximized")); browser = playwright .chromium() .launch(launchOptions); page = browser.newPage(); page.setViewportSize(width,height);