Skip to content

Commit

Permalink
Merge branch 'dev' into doc-269
Browse files Browse the repository at this point in the history
  • Loading branch information
PratheepV authored Dec 12, 2023
2 parents a0d77fd + 79440a7 commit bcdf27e
Show file tree
Hide file tree
Showing 18 changed files with 347 additions and 351 deletions.
57 changes: 24 additions & 33 deletions src/pages/docs/addons/ocr-extraction.md
Original file line number Diff line number Diff line change
@@ -1,75 +1,66 @@
---
title: "How to create OCR Text Extraction Addon"
metadesc: "This article discusses how to create an addon for OCR text extraction for Testsigma app | OCR Text Extraction addon will help you to extract texts from images"
title: "Create OCR Text Extraction Addon"
page_title: "Create OCR Text Extraction Addon: Enhanced Test Automation"
metadesc: "Create OCR Text Extraction Addon seamlessly with our step-by-step guide. Extract text from pages, images, and elements effortlessly. Enhance your testing."
noindex: false
order: 17.81
page_id: "Create a OCR Text Extraction Addon in Testsigma"
warning: false
contextual_links:
- type: section
name: "Contents"
- type: link
name: "Prerequisites"
url: "#prerequisites"
- type: link
name: "Update the Action Code"
url: "#update-the-action-code"
- type: link
name: "Overview of the method to extract text"
url: "#overview-of-the-method-to-extract-text"
name: "OCR Code Update"
url: "#ocr-code-update"
- type: link
name: "Using OCR Addon in a Test case"
url: "#using-ocr-addon-in-a-test-case"
---


---

In this article, we will discuss how to create an addon for OCR text extraction. The creation part for the addon is similar except we set a class that implements the OCR interface.
This guide will instruct you step-by-step on how to create an OCR Text Extraction Addon for Testsigma. You should set up a class that implements the OCR interface, update the action code, and use the addon in test cases.

---

## **Prerequisites**

- To know about the prerequisites for addons, refer to [prerequisites for creating an add-on](https://testsigma.com/docs/addons/pre-requisite-to-create-addon/).

- To know how to create an addon, refer to [create a Testsigma addon](https://testsigma.com/docs/addons/create/).
Before creating the OCR Text Extraction addon, ensure you have met the prerequisites for addon development. For more information, refer to the [Creating an Addon](https://testsigma.com/docs/addons/create/).

---

## **Update the Action Code**

1. Unzip the downloaded zip file and open the extracted folder in your favorite IDE as a Java module. This Java module contain the following template files which need to be updated:
![Folder](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/folder.png)

- **pom.xml:** Contains all your dependencies needed to code your functionality.

- **src folder:** Sample source java files with sample add-on functions.


2. From your IDE, import the downloaded Java module as Maven/Gradle.


3. The Template Java module contains all necessary dependencies required to develop an Addon. For OCR Text Extraction action, you can add the following to pom.xml.
1. Unzip the downloaded zip file and open the extracted folder in your preferred IDE as a Java module. ![Folder](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/folder.png)
2. Import the Java module as Maven/Gradle from your IDE.
3. Update the following template files:
- **pom.xml**: Contains dependencies for coding your functionality.
- **src folder**: Includes sample Java files with addon functions.
![OCR code update](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/ocr.png)

---

## **Overview of the method to extract text**

- ***extractTextFromPage():*** This method will extract text from an entire page.

- ***extractTextFromImage(OCRImage image):*** This method will extract text from a specified OCRImage object.
## **OCR Code Update**

- ***extractTextFromElement(Element element):*** This method will extract text from a specific Element object.
1. In the pom.xml file, add the necessary dependencies for OCR Text Extraction.
2. Update the following methods in the Java module:
- ***extractTextFromPage():*** Extracts text from an entire page.
- ***extractTextFromImage(OCRImage image):*** Extracts text from a specified OCRImage object.
- ***extractTextFromElement(Element element):*** Extracts text from a specific Element object.

[[info | **NOTE**:]]
| All three methods mentioned above will return a List of OCRTextPoint objects, which represent the location of the text within the source.
| All three methods return a List of OCRTextPoint objects, representing the text's location within the source.

---


## **Using OCR Addon in a Test case**

Once you publish the addon, the NLPs will be available in the application. Example NLP, 'Click on the ***Element*** by the text ***test-data***'.



Once the addon is published, NLPs become available in the application. Follow these GIF below to use the OCR addon in Test Cases: ![Addon GIF](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/ocr_text_extraction_addon.gif)

---
69 changes: 24 additions & 45 deletions src/pages/docs/desired-capabilities/incognito-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,82 +10,61 @@ warning: false
contextual_links:
- type: section
name: "Contents"
- type: link
name: "Prerequisites"
url: "#prerequisites"
- type: link
name: "Desired Capabilities for Incognito or Private Browser"
url: "#desired-capabilities-for-incognito-or-private-browser"
- type: link
name: "Add Desired capabilities in Ad-hoc Run Screen"
url: "#add-desired-capabilities-in-ad-hoc-run-screen"
name: "Adding Desired Capabilities in Test Case"
url: "#adding-desired-capabilities-in-test-case"
- type: link
name: "Add Desired capabilities in Test Plan"
url: "#add-desired-capabilities-in-test-plan"
name: "Adding Desired Capabilities in Test Plan"
url: "#adding-desired-capabilities-in-test-plan"
---

---
Desired Capabilities are a set of properties used for customizing the Test Environment. The customization includes adding browser extensions to the automation sessions, setting the Geographical locations for the test machine, bypassing browser alerts, etc.

Desired capabilities have now been added to the browser's Incognito/Private tab to launch the new browser or not save details and run every time a new test case in browsers.
Desired Capabilities allow you to customise the test environment by adding browser extensions, setting geographical locations, and bypassing alerts. Testsigma enables you to run tests in Incognito/Private mode to ensure a clean testing space. This guide helps you easily configure your testing environment for this mode.

---

### **Prerequisites**
## **Prerequisites**

Before using the Incognito/Private Mode Browser Testing feature, you should understand the concepts of [Create Ad-hoc Runs](https://testsigma.com/docs/runs/adhoc-runs/), [Create Test Cases](https://testsigma.com/docs/test-cases/manage/add-edit-delete/#creating-a-test-case), and [Create Test Plans](https://testsigma.com/docs/test-management/test-plans/overview/). in Testsigma.
Before starting testing in Incognito/Private Mode, you must understand specific concepts, such as creating [Test Cases](https://testsigma.com/docs/test-cases/manage/add-edit-delete/) and [Test Plans](https://testsigma.com/docs/test-management/test-plans/overview/), managing [Ad-hoc runs](https://testsigma.com/docs/runs/adhoc-runs/) and [Test Machines](https://testsigma.com/docs/test-management/test-plans/manage-test-machines/) in Testsigma.

---

## **Desired Capabilities for Incognito or Private Browser**

Use the following Desired Capabilities to enable Incognito or Private mode:

|Capability - Key|Data Type|Value|Function|
|---|---|---|---|
|testsigma.privateBrowsing|Boolean|True|The selected browser will be launched in **incognito** or **private mode**|
|testsigma.privateBrowsing|Boolean|False|The selected browser will be launched in **Normal mode**|
|No Capability|Boolean|False|The selected browser will be launched in **Normal mode**|

[[info | NOTE:]]
| Desired Capabilities for Incognito/Private Tab Browsers Support **Google Chrome**, **Mozilla Firefox**, and **Microsoft Edge**.
| **Google Chrome**, **Mozilla Firefox**, and **Microsoft Edge** support the desired capabilities for Incognito/Private Tab Browsers.

---

## **Add Desired capabilities in Ad-hoc Run Screen**

1. Navigate to **Test Development** > **Test Cases**. Create a new project or open an existing project.
![Choose Project](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/overview/testcase_dc.png)

2. Click **Run** after adding the test steps.
![Run test case](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/overview/run_testcase_dc.png)

3. The **Ad-hoc Run** screen will appear; select **Test Lab** and **Test Machines**. Click on **Desired Capabilities (Optional)**.
![Enable Desired Capabilities](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/overview/ad_hoc_run_e_dc.png)

4. Enter **testsigma.privateBrowsing** in the key, select data type **Boolean** from the drop-down list, and enter **true** for the value in the Desired Capabilities field. Click **Run Now**.
![Enter capabilities](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/overview/capabilities_adhocrun_dc.png)
## **Adding Desired Capabilities in Test Case**

5. Test steps will be executed in the Incognito/Private tab.

Here is a quick GIF demonstrating the above workflow: ![gif for test case](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/overview/dc_ad_hoc_run.gif)
1. Click **Run** in the top right corner of the screen on the Test Case details page.
2. In the **Ad-hoc Run** screen, you should select **Test Lab** and **Test Machine**. Then, you can click on **Desired Capabilities (Optional)**.
3. Enter **testsigma.privateBrowsing** in the key. Select **Boolean** as the data type and enter **true** for the value in the Desired Capabilities field.
4. Click **Run Now** to execute the Incognito/Private tab test steps. ![Add capabilities in Test Case](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/adding_ic_testcase.gif)

---

## **Add Desired capabilities in Test Plan**

1. Navigate to **Select project** > **Test Development** > **Test plan**.
![Choose Test plan](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/overview/testplan_dc.png)

2. Click an existing test plan and click **Edit** in the top right corner.
![Edit in test plan](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/overview/testplanedit_dc.png)

3. On the **Edit test plan** page, navigate to the **Test devices & suites** tab. Add test suites to the test plan and Click **Add Machine Device**.
![Edit test plan](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/overview/edittestplan_dc.png)

4. On the screen, an **Add Machine/Device** overlay will appear. Enter the machine's **name**, select **Lab** from the drop-down list, and then select **Machines**. Click on **Desired Capabilities (Optional)**.
![Enable DC in test plan](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/overview/desired_capabilities_testplan_dc.png)

5. Enter **testsigma.privateBrowsing** in the key, select data type **Boolean** from the drop-down list, and enter **true** for the value in the Desired Capabilities field. Click **Create**.
![Enter Capabilities in field](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/overview/desired_capabilities_field_testplan_dc.png)

6. To update the test plan, click **Next** > **Update**.
## **Adding Desired Capabilities in Test Plan**

Here is a quick GIF demonstrating the above workflow: ![Test Plan Gif](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/overview/dcd_ad_testplan.gif)
1. Navigate to the **Test Machines & Suites Selection** tab on the **Create** or **Edit Test Plan** page.
2. Clicking **Add Machine**/**Device** allows you to add a test machine. You can edit existing machines by clicking **Test Machine Settings**.
3. On the **Add** or **Edit test machine/device** profile screen, enter the **machine's name**, select a **lab**, and select a **machine** from the drop-down list. Click on **Desired Capabilities (Optional)**.
4. Enter **testsigma.privateBrowsing** in the key. Select **Boolean** as the data type and enter **true** for the value in the Desired Capabilities field. Then click **Create**/ **Update** profile to save the configuration.
5. Click **Create/Update** to save and update the test plan. ![Add capabilities in Test Plan](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/adding_ic_testplan.gif)

---
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@ When creating elements for an application, you need to provide a way to identify

5. **Name:** This will be the value assigned to the attribute **Name** for the element you want to capture.

6. **Resource ID:** This will be the value assigned to the attribute **Resource ID** for the element you want to capture. Resource ID allows alphanumeric values along with special characters like dot(.), underscore(_), colon(:), and forward-slash(/).

---

---
3 changes: 2 additions & 1 deletion src/pages/docs/elements/ios-apps/supported-locator-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ When creating elements for an application, you need to provide a way to uniquely
4. **Class Name:** This will be the value assigned to the attribute ‘Class Name’ for the element you want to capture.
5. **Name:** This will be the value assigned to the attribute ‘Name’ for the element you want to capture.
6. **iOS Chain:** A hybrid between XPath and predicate strings
7. **Predicate String:** For basic comparisons and matching.
7. **Predicate String:** For basic comparisons and matching.
8. **Resource ID:** This will be the value assigned to the attribute **Resource ID** for the element you want to capture. Resource ID allows alphanumeric values along with special characters like dot(.), underscore(_), colon(:), and forward-slash(/).
<br>

To know how these can be used while creating elements in Testsigma, please refer to the documents below:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: "How to enter non-text keys in Test Cases?"
metadesc: "You can use non-text keys from keyboard in your test cases in Testsigma Application | Learn how to use non-text keys from keyboard in your test cases"
title: "Entering Non-Text Keys in Test Cases"
page_title: "Efficiently enter Non-Text Keys in Test Cases for Testing"
metadesc: "Learn how to simulate non-text key inputs seamlessly in your test cases, ensuring precise testing outcomes. Explore the guide for effective testing strategies."
noindex: false
order: 24.2
page_id: "Enter non-text keys in Test Cases"
Expand All @@ -9,15 +10,20 @@ contextual_links:
- type: section
name: "Contents"
- type: link
name: "Keys and Values"
url: "#keys-and-values"
name: "Keys and Corresponding Values"
url: "#keys-and-corresponding-values"
---
<br>

Simulating the pressing of non-text keys such as backspace, enter, control, tab, arrow keys, function keys, and others is a common requirement during testing. Refer to the table below and use the corresponding values for each key in your test cases.
---

Testing applications requires simulating non-text keys' input on an everyday basis. This includes replicating actions like pressing backspace, enter, control, tab, arrow keys, and function keys. To accomplish this in Testsigma, you should follow the guide below and include the specified values for each key in your test cases.

---

## **Keys and Corresponding Values**

Use NLPs in your test cases to input non-text values. For example, utilise the NLP **Press Test Data key** and substitute the values for **Test Data**. Consult the table below for the mapping of keys to their corresponding values. ![Enter non-text vaules in Test Cases](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/entering-non-text-keys.gif)

## **Keys and Values**
|**Keyboard’s Key**|**Values**|
|---|---|
|Arrow Key – Down|ARROW\_DOWN|
Expand Down Expand Up @@ -51,11 +57,5 @@ Simulating the pressing of non-text keys such as backspace, enter, control, tab,
|Function Key F11|F11|
|Function Key F12|F12|


Refer to the sample GIF below to understand how to use Non-text keys in Test Cases.
![GIF](https://s3.amazonaws.com/static-docs.testsigma.com/new_images/projects/applications/nontext.gif)




---

2 changes: 1 addition & 1 deletion src/pages/docs/integrations/test-labs/browserstack.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Integrate Testsigma with BrowserStack"
metadesc: "BrowserStack integration lets you execute your Testsigma tests on BrowserStack. Learn how to integrate the BrowserStack Cloud Test Execution Platform with Testsigma"
noindex: false
order: 16.41
order: 16.42
page_id: "Integrate Testsigma with BrowserStack"
warning: false
contextual_links:
Expand Down
Loading

0 comments on commit bcdf27e

Please sign in to comment.