Articles Tagged 'web'

Articles
Run Playwright code with Rapise

If you already have Playwright tests and want to execute them using Rapise, or if you need Playwright's advanced features for complex scenarios, you can now run Playwright code directly within Rapise tests. Requires Rapise 8.3+.

ChromeDriver update: onbeforeunload is not fired any more since 126.0.6465.0

Since version 126.0.6465.0 ChromeDriver behaves according to W3C standard. Specifically:

Whenever active sessions is a list containing exactly one item, and that item is a HTTP session, but is not a BiDi session, then in the steps to fire beforeunload, implementations must act as if showing an unload prompt is likely to be annoying, deceptive, or pointless. This means that beforeunload prompts are never shown when there's an active HTTP-only session.

Chrome for Testing

This is the mirror of  https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json

Using links from this JSON file you may download specific versions of Chrome that do not auto-update.

Testing mobile applications built with Ionic framework

Ionic is an open source UI toolkit for building performant, high-quality mobile apps using web technologies — HTML, CSS, and JavaScript. This means that being mobile, Ionic applications are web applications by nature. And it is much more convenient to test them via WebDriver rather than Appium. Requires Rapise 8.1+.

How to access SOAP web services using C# with WCF

This knowledge base article describes how to connect to the SpiraTest, SpiraPlan & SpiraTeam SOAP web services using .NET code written in C#. The code assumes that you're using Visual Studio 2008 or later and are using the newer .NET 3.0+ Windows Communication Foundation (WCF) "Add Service Reference" rather than the older .NET 2.0 ASMX web service client.

 

Inflectra Account vs Inflectra Support Account

We get questions from users sometimes where they get confused between their Inflectra customer account and their Inflectra support account. This article provides some clarity.

How to access Spira v4.x SOAP web services using Java

This knowledge base article describes how to connect to the SpiraTest, SpiraPlan & SpiraTeam 4.x SOAP web services using Java code. It assumes that you've generated the SOAP proxy classes using JAX-WS. If you need to download pre-compiled versions of the classes, they can be downloaded from this knowledge base article.

Note: We now recommend customers use our REST web service instead as Java has removed a lot of the JAX-WS classes from the newest versions of the JRE: https://api.inflectra.com/Spira/Services/v7_0/RestService.aspx

Sample code is here: GitHub JUnit Sample.

This article can be considered as obsolete, we now recommend customers use our REST web service instead as Java has removed a lot of the JAX-WS classes from the newest versions of the JRE: https://api.inflectra.com/Spira/Services/v7_0/RestService.aspx

How to access Spira v4.0 SOAP web services using Java

This knowledge base article describes how to connect to the SpiraTest, SpiraPlan & SpiraTeam SOAP web services using Java code. It assumes that you've either generated the SOAP proxy classes using JAX-WS or are using the pre-compiled ones attached to this KB article.

This article is obsolete, we now recommend customers use our REST web service instead as Java has removed a lot of the JAX-WS classes from the newest versions of the JRE: https://api.inflectra.com/Spira/Services/v7_0/RestService.aspx

How to access Spira v3.x SOAP web services using Java

This knowledge base article describes how to connect to the SpiraTest, SpiraPlan & SpiraTeam SOAP web services using Java code. It assumes that you've generated the SOAP proxy classes using JAX-WS. If you need to download pre-compiled versions of the classes, they can be downloaded from our website at: JavaSoap30Classes.zip

Note: We now recommend customers use our REST web service instead as Java has removed a lot of the JAX-WS classes from the newest versions of the JRE: https://api.inflectra.com/Spira/Services/v7_0/RestService.aspx

Sample code is here: GitHub JUnit Sample.

Elastic XPATH Expressions

When working on UI test automation for a web application a test engineer has to deal with XPATH expressions. They are used to locate UI elements during test execution. It is very important to use such XPATH expressions that do not break when developers update the application. Good XPATH expressions which still find required elements after UI modification can be referred to as resilient or elastic.

In this article we'll consider several examples of elastic XPATH expressions.

 

Increasing the Maximum Upload File Size in IIS

By default, IIS web server allows for limited file size to be uploaded to the web server. For IIS 6 and IIS 7, the default maximum file upload size is 4 MB and 28.6 MB respectively. IIS 7 returns a 404 error (HTTP Error 404.13 - CONTENT_LENGTH_TOO_LARGE) if someone uploads something larger than 30MB. In order to allow for larger file size uploads, a few server changes are required.

Working with HTML Tables containing Dynamic Data

Many web sites use HTML tables to display lists of tabular data. When testing such applications you will often need to dynamically search for items in the table to verify that the application under test performed correctly. This guide outlines best practices for accessing data held in HTML tables.

This article is obsolete. For dealing with dynamic table data please refer to How to define and use a dynamic Web locator article.

How to automate testing of Flutter Web applications

In most cases Flutter Web applications are built with CanvasKit renderer (flutter build web --web-renderer canvaskit). It means that by default UI elements of an application are not visible to test automation tools. They see just the big pane that covers all browser window. So does Rapise. However, there is a simple workaround that can be applied to solve this problem. 

Custom Attributes for XPath Generation in the Rapise Web Spy

Sometimes web applications use custom DOM attributes for internal purposes. XPath locators containing those attributes are sometimes more stable and resilient. Rapise contains features intended to simplify utilization of such attributes.

How to launch a web browser in Rapise with a specific size

Sometimes when recording a test against a mobile responsive web site, it is useful to be able to record on the local browser (before playing it back against a cloud service such as SauceLabs, Browserstack, etc.). However you want to always record using a specific browser window size.

How to disable recording URLs

When you do recording of test steps for a Web application - Rapise by default captures page URLs and stores them in the object repository. Learn how to  disable URL recording from this article.

Requires Rapise 6.4+

How to manipulate browser cookies using Selenium API in Rapise

If you run Rapise tests via Selenium WeDriver you may need to manipulate browser cookies. Learn how from this post.

How to define a profile for Web Application in Rapise

Each web application is unique in terms of assigning attributes to elements and this complicates the process of generating XPath locators. Some applications assign dynamic IDs to elements, some use ARIA attributes and some do not, some values of class attribute have meaning related to element position and some just used for styling . There are also cases when an app contains hidden DOM layers which stack on top of each other. So usage of same set of attributes for generating XPath is not efficient and may lead to weak locators that break after application reloading or slight modification. To cope with these problems Rapise introduces Web App Profile. It is a simple JSON file of a defined structure that instructs Rapise how to build XPath for elements in a particular application. From this article you will learn how to define a profile for your web application.

How to launch a browser in private mode?

In some cases it makes sense to launch a browser in private mode to ensure exact same conditions every time you run a test.  This helps to cope with such things as remembered accounts or pending sessions not disconnected by a previous test.  Learn how to properly adjust browser profiles from this article.

What to do When Rapise Doesn't Display the Web Page DOM?

Sometimes when testing certain web applications instead of the browser DOM tree appearing you will see strange results such as "Node0" appearing. This is caused by the application using nested frames with potentially different security origins. This article describes some of the common issues and describes the solution.

Changing REST Headers When Web Service Testing

When performing web service testing using Rapise you may need to change the HTTP headers being sent with the request. This article provides suggestions on the different ways of doing this.

Testing Popup Windows using Internet Explorer

When you are testing a web application that has popup windows (where the popup is a whole new browser window) you will need to make a slight change to the test script to enable it to playback successfully in Internet Explorer (no change is needed for Chrome or Firefox).

Rapise Tip - How to Handle a Webpage that Displays an Alert when You Navigate Away

One of our users had a webpage with a form. When it was submitted partially filled, the page came back (after being processed on the backend) with some errors about incomplete form. If the user tried to navigate away from this page via a link (or close the page/browser tab) he was prompted with browser's standard "Are you sure you want to leave this page?" dialog. He needed a way for Rapise to handle this popup when recording and playing back the web test.

Testing Multiple Web Browser Tabs at Once in Chrome

Sometimes you have a web test where you need to test the contents of two browser tabs at the same time in Google Chrome. For example you may have an application which opens up a second browser tab and you want to test that changes in the second tab show up correctly in the first tab. This article describes how to perform this kind of testing.

When recording with Chrome, Rapise does not record actions within frames
When creating web tests with Chrome, objects within cross-frames are not recognized by the Rapise Web Spy and recorder. This article gives a solution.
Different XPath Options in Rapise 4.0

When testing complex data-driven web applications using Rapise, it is helpful to understand the different ways that Rapise can automatically learn the objects. Rapise can learn an object using either XPATH or CSS. In the case of XPATH there are several strategies that Rapise can use to make the testing more robust. This article describes these strategies and provides some suggestions about which one is the best to use for different scenarios.

WebSpy Attribute Filtering

The v4.0 release of Rapise adds enhanced attribute filtering to the Web Spy as well as different options for creating XPath queries automatically. This article explains why you would want to use these features and how they can make the testing of complex data-driven web applications much easier.

Dynamically constructing the .rest file URLs to test REST APIs

Sometimes when using Rapise to test REST web services, you want to be able to dynamically change the base URL of the web service yet still use the same URL template and method information. This article describes a process for achieving this.

Web testing - Dynamically Switching the Browser in the Same Test

Sometimes you have a test that you want to run on Chrome, Firefox, and IE in the same script. Normally you write a browser-agnostic test and then have SpiraTest simply call Rapise with different browser names as a parameter and then you have the same test executed multiple times. However suppose you want to have a single test that by itself can run on all the necessary browsers. This article addresses this case.

Measuring browser performance with Rapise

How do you get the exact time that Rapise takes to load a page? Now, the reports summary shows the overall execution time but if you have pause times between steps then these times are added to the total time of that a page took to display. Customers have asked if Rapise has some kind of function that will allow them to see only the transaction time between pages without the pause times. Does Rapise have something like that? This article provides a solution to these cases.

Using Rapise 3.1 to test a web page with a multi-select list

When you have a multi-select list in a web application, you may need to check which items are selected, or to check whether or not a particular item is selected. This article illustrates how to do that.

Accessing the Computed Style Properties of an HTML DOM Object
A common question from our users is, is there a way to get object's style properties that are in effect at a certain point in time. (for example, it could have been inherited from higher level of hierarchy, or modified via JavaScript running on the page)? This article describes how to do this.
How to Use Sub-Tests and Common Objects with REST Web Service Tests

It is often useful to have a common set of code libraries and objects that can be reused amongst multiple tests. With Rapise this can be done by creating a common test and then including it into the other actual tests. However due to the way REST web service tests are stored, there are some slight changes needed to handle REST services. This articles describes the process.

Note: if you have Rapise 8.0+ there is a simpler way, just create a module for REST service calls.

Unable to record/play a Java applet using Rapise inside a web browser

Sometimes you have the situation where you can record/play a Java application using Rapise having correctly installed the Java bridge and set the JAVA_HOME environment variable correctly, but applets running inside a web browser do not work. This article provides some suggested solutions

How do I change the URL of the website being tested in Rapise.

We are in the process of adding a new testing server that we would like to be able to run automation scripts against.

 I just wanted to see if there is a process documented for converting scripts and objects to point to a different web address?

Recording Web Menus

Many web sites have dynamic site menus. This guide outlines the best practices for recording events associated with such dynamic site menus.

Run Rapise tests on Bitbar

Bitbar is a browser and device farm that enables it's clients to run cross-browser and mobile tests remotely.

How to set download folder for Selenium - Chrome profile

If your Web testing scenario includes file downloading you may configure `Selenium - Chrome` profile and specify which folder to use to store downloaded files. 

How to emulate keyboard and mouse via Selenium API in Rapise

Though Rapise can execute it's native recorded tests via WebDriver - some users prefer to write their tests in pure Selenium API. In this post we describe how to perform complex mouse and keyboard sequences via Selenium API in Rapise tests.

How to Change Web Application Name in IIS

Spira (SpiraTest, SpiraTeam and SpiraPlan) and KronoDesk all use the Microsoft Internet Information Services (IIS) web server. A common need is to be able to change the IIS application name / virtual directory. For example, you may need to rename "SpiraTest" to "SpiraTeam" after you have upgraded your edition.

How to wait for Web element to disappear from screen

Rapise has built-in function Navigator.DoWaitFor to wait for object to appear. If you need to do the opposite add the following function into your User.js.

Web Server Performance - IIS Worker Process Current Requests

Most on-premise Spira and KronoDesk installations will be using the Microsoft Internet Information Services (IIS) Server to serve the application to users.  If you are experiencing performance problems or slow page load times (and you cannot move to our cloud version), this article will help you troubleshoot IIS worker process requests.

How to work with Shadow DOM via Native Selenium API in Rapise

If your scripting is style is writing JavaScript and using Native Selenium API and you wish to dig inside Shadow DOM - read this short article. Requires Rapise 7.3+

Text Validation Does Not Always Fire on Angular4 Application

Sometimes when you are testing an application written in Angular 4, the text box will not accept a value that is correct during playback (e.g. zip code is not in the right format) when you use DoSetText to set the value.

Accessing the Spira 6.0 REST API using C# .NET

We have had several requests for sample code illustrating how to access the Spira 6.0 REST API in C# code. You can of course use the SOAP API instead where Visual Studio auto-generates the C# code for you, but since we have a complete REST Unit Test framework in C#, we are sharing the sample code

Building a Spira Web Farm with IIS Servers

This document contains an overview of how to setup and configure SpiraTest, SpiraTeam or SpiraPlan in a load balanced web farm scenario. It contains links to additional information from Microsoft, and community resources related to the scenario.

How to Install the Chrome and Firefox Extensions Offline

By default,  when you want to use Rapise to record and playback web tests using either Chrome or Firefox, you simply go to the appropriate web browser "store" and install the extension directly from the store. However sometimes you are testing web applications on a machine with no Internet Connectivity.

Turning off Chrome and Firefox Auto-Updating

When you are testing a web application against different environments, it can be useful disable to default browser auto-updating policies so that you have a stable testing environment. This articles describes how to disable the auto-updating policies of Google Chrome and Firefox.

Searching for a Web element by text that contains non-breaking spaces

Are you writing XPath to find an element using its inner text but it does not work? Most likely the text contains non-breaking spaces.

This situation is described in detail in our UI Test Automation Playground.

Using the WcfBaseUrl to Override Default SOAP WSDL Locations

When you are self-hosting Spira on your own Windows Server using the IIS web server, it will generate standard URL locations for the Web Service Definition Language (WSDL) files used to consume SOAP services. This article explains how you can override the URL to use a different one.

Using Rapise with Java Web Start Applications

Rapise supports testing of Java applications. In the case that application is launched using Java Web Start (JWS) additional steps are needed to successfully test an application.

Unusual case where Rapise Cannot Click on Hyperlinks in IE
We have found an occasional situation where Rapise is not able to click on hyperlinks (<A> tags) when you playback a test on IE. The same test works fine on other computers and on other browsers on the same computer.
Rapise cannot connect to Firefox immediately after Firefox updates

If you try and connect to Firefox with Rapise immediately after Firefox has updated, you may see the following error message:

Microsoft JScript runtime error: 'Navigator.GetBrowserHWND()' is null or not an object

Running Selenium WebDriver Scripts using RemoteLaunch and JUnit
This article explains the process for running Selenium WebDriver test scripts written in Java using JUnit, RemoteLaunch and SpiraTest.
How to get the ID of a test case from it's name using SOAP web services
This article describes the process for calling SpiraTest / SpiraTeam using its SOAP web service API to query the system to retrieve a list of test cases that match a specific name so that you can obtain its test case id.