How to create user-defined web object?

I checked on this link Create a User-Defined Object and Set Its Object Identification Properties, but I think it's only for Windows Class Object, I am unable to create a Web Object (I need to create a new Web Element using scripting)

I always failed on this step below:

Set UserDefObj = qtApp.Options.ObjectIdentification("WinListView").CreateUserDefinedObject("MyCustomListView") 

I modified the "WinListView" to "WebElement"

Set UserDefObj = qtApp.Options.ObjectIdentification("WebElement").CreateUserDefinedObject("MyCustomWebElement") 

The operation attempted is not supported. (Exception from HRESULT: 0x80004021)

  • 0  

    Yes it is only supported for Windows objects, what exactly is your scenario, could you elaborate?

  • 0 in reply to   

    My scenario it to verify all the output is similar to the input...

    For the example with the demo site of UFT, once I input data for the laptop and I need to verify the Product Specification is similiar to the data I input

    From the image above, I need to verify that The CUSTOMIZATION value is similar to the input parameter (and so the DISPLAY and dst).

    per the customer's requirement, I could not use the Exist method but I need to retrieve the value next to the column.

    And we also have these scenarios for the mobile app.

  • 0   in reply to 

    Thanks for clarifying.

    What is blocking you from retrieving the value?

  • 0 in reply to   

    per my understanding, I need to create a sibling from the column name. Below is the example from the xpath

    For example //td<@text='DISPLAY'>/following-sibling::td

    so for the mobile app, I try to create one dummy Object to set it as the "value"

    Example for the web app

    - I create object WebElement "Anchor" in the Repository (still created manually for now)

    - SetTOProperty "class" (unique to the value element)

    - I add Visual Relation (The DISPLAY object, with relation to the left and inline)

    SetTOProperty "visual relations"

    - GetROProperty "innertext" -> for Verification

    - Verify the retrieved value is similar to input data

    The step "create object WebElement "Anchor" in the Repository" that I try to do it by scripting