Skip to content

Commit

Permalink
images updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashish authored and Ashish committed Aug 20, 2024
1 parent d6337ef commit ce28a75
Show file tree
Hide file tree
Showing 12 changed files with 122 additions and 69 deletions.
69 changes: 69 additions & 0 deletions docs/browsertesting/config.md
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")


-------------------------------------------
70 changes: 1 addition & 69 deletions docs/browsertesting/playwrightlocatorstrategy.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,72 +356,4 @@



----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
## 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|
|`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")


-------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------
51 changes: 51 additions & 0 deletions docs/faq.md
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**

---------------------------------------
Binary file modified docs/img/configurations/context.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/img/configurations/emulators.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/img/configurations/locale.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/img/toolui/Reusables2.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/img/toolui/TestPlan2.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/img/toolui/TestSteps1.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/img/toolui/TestSteps2.JPG
Binary file not shown.
Binary file modified docs/img/toolui/execution.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ nav:
- Switch: playwrightActions/switch.md
- Mocking: playwrightActions/fulfill.md
- Dynamic Objects: playwrightActions/dynamicObject.md
- Browser Configurations: browsertesting/config.md
- Webpage Performance: webpageperformance.md
- Accessibility Testing: accessibility.md
- Mocking: browsertesting/playwrightmocking.md
Expand Down

0 comments on commit ce28a75

Please sign in to comment.