Scraping User Interface ElementsFeature File to Script Conversion

Feature File to Script Conversion

If you already have test cases that were not produced by algoQA, you can convert them into scripts that work with the new testing platform. This allows you to migrate test cases from one framework (such as Protractor) to another (like WebDriverIO).

This capability is built into the algoScraper extension. To use it, simply open the algoScraper extension from your browser toolbar.

This feature is especially useful during manual testing, where you can take existing test cases and automatically generate scripts from them.

Feature File to Script Conversion

Perform the following:

Prepare a handwritten feature file in BDD format.

Launch the Scraper from the Create Project page or you can directly launch from your web extensions.

To learn more about how to launch the scraper from algoQA, click here.

Click the Feature File to Script Converter option.

algoScraper home panel with Scrape UI, PingLink, Record Scenario and Feature File to Script Converter cards

Browse and upload the handwritten feature file in .txt format.

algoScraper panel with Browse Files button highlighted and drag and drop file area

You can also add multiple feature files by clicking the '+' icon.

algoScraper window with Flipkart.txt tab, highlighted plus icon to add file, and Scrape UI button

Scrape the individual UI elements referenced in the feature file.

algoScraper extension window with scraped control list table and Auto Mapper button highlighted

After scraping all the UI elements, click Auto Mapper.

algoScraper Auto Mapper screen showing Scenario_3a140 at 25% Mapping with progress bar

You can view the percentage of elements that have been mapped automatically.

By clicking the Step Info icon, you can also see the specific steps that have been mapped.

algoScraper Scenario_3a140 steps list with edit icons highlighted next to each mapped step

Manually map the remaining ones.

To edit step details, select the step and click Step Details next to the corresponding GWT step.

From there, you can modify fields such as Control Type, Control Name, Control Action, Control Value, Feature Name, XPath, and Page Name.

Step Details dialog with Control Type Page, Control Action entered, Page Name field and Save button

Click Save after making the changes.

Click algoQA to navigate back to the Create Project page with the scraped file attached.

Enter the project name and click Create.

The scenarios will be created.

Next, generate the test cases and then generate the scripts. To learn more about how to generate test cases, click here.

If you are re-scraping, you can upload the file using the Upload Scraped Data option. To access this feature, navigate to the canvas and click the More dropdown.