Copied Text by Key Action

Modified on Mon, 4 Nov at 11:36 AM

Applicable to Java Selenium Framework 


TABLE OF CONTENTS

1. Overview

2. How to Perform Copy Text by Key Action

2.1 Example scenario

2.2. Execution Report

4. Adding a Parameter

5. Related Article

1. Overview

This guide outlines the process of copying text from a webpage and storing it in a designated object.
The steps involved are:

  • Identify the Text Element: Locate the specific part of the webpage, such as a paragraph or heading, from which you want to copy the text. You'll need to know its identifier, such as an ID or class, to accurately find it.
  • Create Your Storage Object: This serves as the container where the copied text will be saved. Think of it as a box that holds the information you want to retain for future use.
  • Run the JavaScript Code: Use the provided code snippet to execute the text-copying process, which will transfer the specified text into your storage object.

2. How to Perform Copy Text by Key Action 

2.1 Example scenario

Copying and Verifying Text Values

  1. Given I have access to the application
  2. When I copied text from the internet:
    • By key Value1:
    • Value1: Bach
    • By key Value2:
    • Value2: Frank
    • By key Value3:
    • Value3: Doe
  3. Then I verify the content:
    For Value1:
    • Value: Bach
    • Actual Value: Bach
    • Expected Content: Bach
  4. Verification Steps
    • Check the Value:
    • Compare the Actual Value to the Expected Content.
  5. Result of Verification: 
    • If the values match, the verification is successful.
    • If they do not match, report a failure.

2.2. Execution Report

The following screenshot displays execution report for the preceding scenario

4. Adding a Parameter

While adding nodes in the node configuration process, you can parameters. 

If you have already created the project, navigate to the Main Canvas and select the appropriate project under Project Explorer pane. Select the required folder to view the appropriate nodes in the Main Canvas and select the required node, associated feature and the UI element to view Control  List Panel window as shown. In this window, you can add the parameters as shown in the following screen and click Save. 

5. Related Article

Adding and Modifying Default Actions















Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article