Hai, i have a question : How to make browser in fullscreen mode when run a testing ?
i am using $browser->keys('#gs_group', ['{F11}']). But not working
Thank u..
i try this
$browser->maximize()
i want make it fullscreen not only maximize
Hi @muswanto ,
I want to set the maximize as default. If follow your above code, I need to set every tests.
@Nguonchhay Update DuskTestCase and set the window size, this should be ok?
I've tried "--start-maximized" but doesn't seem to do what I had hoped.
At least I don't need to do $browser->resize(1920,1080) everywhere which is the main thing.
/**
* Create the RemoteWebDriver instance.
*
* @return \Facebook\WebDriver\Remote\RemoteWebDriver
*/
protected function driver()
{
$options = (new ChromeOptions)->addArguments([
'--disable-gpu',
'--headless',
'--window-size=1920,1080'
]);
return RemoteWebDriver::create(
'http://localhost:9515',
DesiredCapabilities::chrome()->setCapability(
ChromeOptions::CAPABILITY,
$options
)
);
}
Most helpful comment
@Nguonchhay Update DuskTestCase and set the window size, this should be ok?
I've tried "--start-maximized" but doesn't seem to do what I had hoped.
At least I don't need to do
$browser->resize(1920,1080)everywhere which is the main thing.