Web UI Testing

Hi,

I see on this page https://www.uipath.com/solutions/technology/web-automation that there is supposed to be a way to create “reliable automated web testing.” However, I haven’t found a single resource that allows me to perform an assertion that a value on a page is the expected value. That’s the very foundation of UI testing but I see no instructions on how to create this test using the UiPath Studio.

Anyone know where to look or if I’m not using the right version of the software?

Thanks!

1 Like

@godfathr,

Could you please explain in more details or send me error screenshot.

As per my understanding , I will suggest this !

You have to create the workflow for testing any data or for performing any validation.
For doing this , there are set of activities available in UIPath studio .
Check the activities and use them according to your requirement.
If you are new to UIPath , you can go through the UIPath foundation course available in UIPath academy, it’s free if cost .
Thanks , hope it will help you.

There are many activities within UiPath which will ‘read’ data from a webpage, which it can then validate against your expected values. As @syedabidraza explains, you will need to consruct your own workflows using these activities, specific to your testing requirements

@lacksman, I am not asking about an error, but rather resources for how to perform Web UI tests as advertised in the URL in my original post.

Here is a screenshot of the page.

Thank you!

@syedabidraza, thank you for your response. That actually what I’m asking for. I looked through the content in the UiPath academy and there isn’t anything that I see related to tutorials on how to perform Web UI testing.

If this is something that is left up to me to figure out using the existing activities, then it would be nice to have some examples. Do you know of any tutorials or lessons that show at least one example of using UiPath Studio to perform web testing?

Thank you!

1 Like

@Djh , Thank you. I’ll keep poking around and see if I can get this to work. I thought that since Web UI testing is advertised up front on UiPath.com that there would have been some content in the UiPath Academy directly related to this. It would have been helpful. But I’ll keep work’n at it! Thanks again!

Maybe you could give a small example of something comparable you may want to achieve, and I’m sure the community would be happy to make some examples for you.

e.g. go to XXX website, read XXX data, validate it with XXXX etc. - something small and accessible to all as an example would be great.

That’s a good idea. I probably should have lead with that in hind-sight.

Let’s say I currently use Selenium using an MSTest project and I’m using C# to write my test. The test flow would be:

  • Opens a specified browser type (or multiple browsers of different types if doing tests in parallel for cross browser compatibility testing)
  • Navigates to https://www.google.com
  • Finds the “Google Search” button via X-path (since the CSS selector and element properties on my site are dynamic I use Xpath most often)
  • Verifies (Asserts) that the text on the button reads “Google Search”
  • If the button text is correct, then enter a search term into the text box
  • Presses the “Google Search” button

(Ideally after this the test would continue but for a short example I hope that is a short enough length).

Thank you!

1 Like

Thats great thanks, can I ask - is the aim of the test just to complete the search, or do you genuinely need to perform the validations within, i.e. things like the “Google Search” validation, do you actually need this validated or is it sufficient that it will only perform the actions if the button says google search?

@Djh I’m sorry for the late response. I’m not sure how I missed the notification for your post.

I do need to perform validation. I don’t care at this point what the validation is, but I’m still trying to nail down how to perform a validation. I’ve used a variable and an IF ELSE in UiPath Studio and that kinda worked. However, that’s a lot of components to add to a Web UI testing project IMO.

I’m starting to think that Selenium is the better way to go.

@Djh I believe that I’ve gotten this to work. I’ve added variables for the elements I want to validate and used the Find Element activity to check that the element exists. Then inside an if/else I put the validation of the element content (link text, button text etc.).

Thanks for all the help!

If you are looking to work based on the arrange-act-assert approach to testing, I have used this custom package which provides the Assert Methods common to web testing.

image

Here is a sample Unit Test with instructions

CalculateEquation_ReturnsDecimalValue_DoubleAndDecimalAreNotSame.xaml (12.3 KB)

Thank you. I was able to finish my proof of concept and after doing so, we have decided to use Selenium for web testing. UiPath doesn’t work as a step in our build pipelines.

1 Like