Ask a Question

Test execution fails after I modified variable of a ClickButton operation.

Iso_Yura
Contributor

Test execution fails after I modified variable of a ClickButton operation.

I need to modify my test that it selects button in ClickButton operation by using a variable. 

When I created keyword test in Value column the value displays as "...". I want to 

Iso_Yura_0-1686167584398.png

 

After I changed it to a variable and used "MappedName" value of the button from Object Spy window. I use DB Table as a variable.

Iso_Yura_1-1686167644297.png

 

I'm wondering what will happen when I change the Value using variable to let's say ToolButton5, but in the Item column it will be still ToolButton2? If it says ToolButton2 in the Item column does that mean it will always look for ToolButton2 even when the value will use as variable ToolButton5.

Then I run the test it fails, when it gets to the step where it should click on the button after I changed from "..." to the variable the error details say: "Exception. Type mismatch".

Iso_Yura_0-1686169624161.png

 

 

What can cause this error? 

 

 

18 REPLIES 18
rraghvani
Champion Level 3

The button that you are clicking on, is it a tool bar? What is the value of your project variable? Do you want to click the button based on the project variable value?

I'm using test suite variable, and this is the value which I'm using: "Aliases.IsoSpeak.MainOptionsModule.centralWidget.uiLayoutWidget.NewProjectMenuModule.Widget3.Widget.ToolButton2" in DB Table.

No it's not a tool bar, it's a button that makes a selection of the project type.

Iso_Yura_0-1686169448429.png

 

rraghvani
Champion Level 3

If I understand correctly, you have declared the following,

ProjectSuite.Variables.Config_DDL_Meteor["TC_Chip_button"] = "Aliases.IsoSpeak.MainOptionsModule.centralWidget.uiLayoutWidget.NewProjectMenuModule.Widget3.Widget.ToolButton2"

and you are trying to perform a click button like so,

ClickButton(ProjectSuite.Variables.Config_DDL_Meteor["TC_Chip_button"])

 which will not work.

 

ProjectSuite.Variables.Config_DDL_Meteor["TC_Chip_button"] 

is a DB Table type variable, and I see that it's not working. In all other tests DB Table variable works fine for different operations.

This is what I want to figure out where is the issue and how can I make it works.

rraghvani
Champion Level 3

What is the value of ProjectSuite.Variables.Config_DDL_Meteor["TC_Chip_button"] ?

 

 

This is the value: 

"Aliases.IsoSpeak.MainOptionsModule.centralWidget.uiLayoutWidget.NewProjectMenuModule.Widget3.Widget.ToolButton2"

When I use object spy and select this button this is what TC displays. I don't know what other value can be used.

rraghvani
Champion Level 3

The variable ProjectSuite.Variables.Config_DDL_Meteor["TC_Chip_button"] has the value of "Aliases.IsoSpeak.MainOptionsModule.centralWidget.uiLayoutWidget.NewProjectMenuModule.Widget3.Widget.ToolButton2" ?

 

 

When open Operation Parameters of the ToolButton2 this is what values it has. 

Iso_Yura_0-1686231708401.png

 

It doesn't contain any actual values of the button.

Yes.

cancel
Showing results for 
Search instead for 
Did you mean: