Is this possible? Done some research into Xpath, and it still has me confused, I have read that it can’t be used with “findTestObject”. Is that still the case?
Ultimately, this is what I would like to do -
Int Total_Balance = WebUI.click(findTestObject(‘Object Repository/Page_Site/span_’ + “WildCard” + AUD))
Int Trade = Total_Balance / 5
WebUI.setText(findTestObject(‘Object Repository/Page_Site/input_in Australian dollars_amount’), Trade)
Xpath for Reference - //div[@id=‘globalWrapperPage’]/div[5]/div/div/div/button/span/span
You don’t seem to understand. The xpath is how the computer finds the element, but the above is just an object’s name. Absolutely no reason to have a wildcard in a name–just give it a generic name.
If you find the name in the Object Repository and double click on it, that will display the items that you are using to identify the element. Look for the xpath item. It’s here that you can use a parameter (your wildcard). Unfortunately, I don’t understand what part you would have as a parameter.
Next:
A click event does not return anything, so the above makes no sense. You will have to use another statement, like getText() or getAttribute(). First, you need to get the information from the element, which will be a String, after which, you can convert to an Integer (maybe a Double would be better). As an example: