-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ashish
authored and
Ashish
committed
Aug 20, 2024
1 parent
d6337ef
commit ce28a75
Showing
12 changed files
with
122 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Browser-Context/Page Configurations | ||
|
||
??? note "Headless, SlowMo and other Browser Context Options" | ||
|
||
### Browser Context Options | ||
|
||
The following options can be set while creating a Browser Context : | ||
|
||
|<div style="width:250px">Options</div> |Description| | ||
|-------------|---------------| | ||
|`setHeadless`|By default, this is `true`. If you set it as `false`, you will see the browsers opening up during execution| | ||
|`startMaximized`|By default, this is `false`. If you set it as `true`, you will see the browsers opening up as maximized| | ||
|`setSlowMo`|This is slow down the execution by **N** milliseconds per operation| | ||
|`setChannel`|Browser distribution channel. Supported values are **chrome**, **chrome-beta**, **chrome-dev**, **chrome-canary**, **msedge**, **msedge-beta**, **msedge-dev**, **msedge-canary**.| | ||
|`setChromiumSandbox`|Enable Chromium sandboxing. Defaults to `false`.| | ||
|`setDevtools`|**Chromium-only**. Whether to auto-open a Developer Tools panel for each tab. If this option is `true`, the headless option will be set `false`.| | ||
|`setDownloadsPath`|If specified, accepted downloads are downloaded into this directory. Otherwise, temporary directory is created and is deleted when browser is closed. In either case, the downloads are deleted when the browser context they were created in is closed.| | ||
|`setExecutablePath`|Path to a browser executable to run instead of the bundled one. If executablePath is a relative path, then it is resolved relative to the current working directory. Note that Playwright only works with the bundled Chromium, Firefox or WebKit, use at your own risk. | ||
|`setTimeout`|Maximum time in **milliseconds** to wait for the browser instance to start. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.| | ||
|`setProxy`|Proxy to be used for all requests. HTTP and SOCKS proxies are supported, for example `http://myproxy.com:3128` or `socks5://myproxy.com:3128`. Short form `myproxy.com:3128` is considered an HTTP proxy.| | ||
|
||
In **INGenious Playwright Studio** you can specify all of these in the **Configuration** Window like this : | ||
|
||
![context](../img/configurations/context.JPG "context") | ||
|
||
|
||
|
||
------------------------------------------------------------- | ||
|
||
??? note "Emulation" | ||
|
||
### Emulation | ||
|
||
Playwright can emulate various devices by specifying the following options when creating a context : | ||
|
||
* `setDeviceScaleFactor` | ||
* `setHasTouch` | ||
* `setIsMobile` | ||
* `setScreenSize` | ||
* `setUserAgent` | ||
* `setViewportSize` | ||
|
||
In **INGenious Playwright Studio** you can specify all of these in the **Configuration** Window like this : | ||
|
||
![emulator](../img/configurations/emulators.JPG "emulator") | ||
|
||
The complete list of Playwright supported device configurations can be found [here](https://github.com/microsoft/playwright/blob/main/packages/playwright-core/src/server/deviceDescriptorsSource.json) | ||
|
||
|
||
|
||
------------------------------------------- | ||
|
||
??? note "Locale and Timezone" | ||
|
||
### Locale and Timezone | ||
|
||
|
||
|
||
Emulate the user Locale and Timezone which can be set globally for all tests in the config and then overridden for particular tests. | ||
|
||
* `setLocale` | ||
* `setTimezoneId` | ||
|
||
In **INGenious Playwright Studio** you can specify all of these in the **Configuration** Window like this : | ||
|
||
![locale](../img/configurations/locale.JPG "locale") | ||
|
||
|
||
------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# **Frequently Asked Questions (FAQs)** | ||
|
||
--------------------------------------- | ||
??? example "Unable to launch INGenious, getting "Windows protected your PC" pop-up when clicking on Run.bat file in Windows" | ||
## Unable to launch INGenious, getting "Windows protected your PC" pop-up when clicking on Run.bat file in Windows. | ||
|
||
**Why am I unable to launch Ingenious and getting the below mentioned Windows pop-up when clicking on the Run.bat file ?** | ||
|
||
![WindowsErrorPopUp](img/Things/WindowsErrorPopUp.png "WindowsErrorPopUp") | ||
|
||
Right click on **Run.bat --> Properties -->Unblock --> Apply** | ||
|
||
|
||
--------------------------------------- | ||
??? example "Browser not coming up while running tests from Ingenious" | ||
## Unable to launch Browser while running the automated test cases from Ingenious. | ||
|
||
**Why am I unable to launch Browser while running the automated test cases from Ingenious ?** | ||
|
||
Try to run the test cases after doing this setting in INGenious Playwirght Studio | ||
Navigate to Configuration --> Select Browser Configuration --> Manage Browsers --> Capabilities/Options --> Add 'setHeadless' property with its value as 'False' --> Save** | ||
|
||
![SetHeadlessConfiguration](img/Things/SetHeadlessConfiguration.png "SetHeadlessConfiguration") | ||
|
||
|
||
--------------------------------------- | ||
|
||
??? example "java.lang.OutOfMemoryError: Java heap space" | ||
|
||
## Handle `java.lang.OutOfMemoryError: Java heap space` | ||
|
||
**How to handle "java.lang.OutOfMemoryError: Java heap space" ?** | ||
|
||
While executing the test scripts, the BDD json reporter was throwing "java.lang.OutOfMemoryError: Java heap space". This happens because of the large number of test steps with screenshots. In order to handle it, **modify the Run.bat and/or Run.command files to increase the Java contiguous memory allocation before startup.** | ||
So, here is an example of the corresponding Run.bat file. | ||
|
||
![JavaHeapSize](img/Things/JavaHeapSize.png "JavaHeapSize") | ||
|
||
------------------------------------- | ||
|
||
??? example "Q. Unable to launch INGenious, getting "Windows protected your PC" pop-up when clicking on Run.bat file in Windows. | ||
|
||
## Unable to launch INGenious, getting "Windows protected your PC" pop-up when clicking on Run.bat file in Windows. | ||
|
||
**Why am I unable to launch Ingenious and getting the below mentioned Windows pop-up when clicking on the Run.bat file ?** | ||
|
||
![WindowsErrorPopUp](img/Things/WindowsErrorPopUp.png "WindowsErrorPopUp") | ||
|
||
Right click on **Run.bat --> Properties -->Unblock --> Apply** | ||
|
||
--------------------------------------- |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters