Question

Object looks and acts like a comb or list box, but Tosca only scans it as a Div ...

  • 30 April 2024
  • 2 replies
  • 37 views

Badge

I have a bunch of controls on a web page that look and act like combo or drop down boxes. Click to pull down, and choose a value from a pre-defined list. Or you can start typing to quickly get to the item you want to select.

But when I scan them with Tosca I just get a generic Div object. Not only does the icon of the object not display like would expect for a list box, I don’t see any of the values available.

How does something like this get handled? I need to be able to both verify the contents of the lists, and select them.

p.s. I’m guessing the developers have used some other toolkit behind the scenes to make this look like a regular control when it’s actually not?

Thanks very much in advance!


2 replies

Userlevel 3
Badge +2

If you want <DIV> to be scanned as a ComboBox you would need to write a TOSCA extension in C#. The Tricentis Tosca Expert Series − Extending Tosca's out-of-the-box capabilities (AE2) training shows you how to that. However, that is the last course of the engineering training series and you need to do the three previous courses and pass the tests before your can start that course. We are looking at very advanced techniques here.

Userlevel 3
Badge +1

You’ve guessed correctly, the developers have used some toolkit (or their own custom implementation) for those controls. This is very common these days with web applications. Combo boxes and tables in particular are often implemented in many different ways, to the point where seeing a traditional SELECT or TABLE almost feels like an exception!

As @krischik has pointed out, it’s possible to customise Tosca to display and steer them like regular ComboBox, but that is an advanced method.

You will most likely need to figure out how to identify each component of the control and automate each individual action required to select a list item, and implement it that way. Even with customisation, that’s generally the first step anyway - you still have to basically reverse engineer the control first. Customisation basically just hides the underlying mechanics and identification logic away, to simplify the actual scanning and test steps and make them look and behave more like a standard control. Without customisation, assuming you need to deal with many of these in your application, you’ll probably want to wrap up the individual steps into a reusable test step block (and possibly use a more generic module as well) so you don’t have to repeat the effort everywhere.

Vision AI might be an option as well ,since it may be able to identify them as combo boxes. I personally wouldn’t go that route with a web application, but I’ve had plenty of experience dealing with trickier controls like these so you might still want to consider it if you have trouble getting it to work with the standard HTML engine.

Reply