Quantcast
Channel: New board topics in SmartBear Community
Viewing all articles
Browse latest Browse all 21061

Is it possible to place a variable within an object path and use the Set Variable Value to define?

$
0
0

I have an action to click on a particular button named the following

 

Aliases["LocationManager"]["HwndSource_Window"]["WindowLocationManagerQa20151Version116115C"]["PrismShellWindowContent"]["ContentRegion"]["ModalRegionsControl"]["MainContainer"]["ModalContainer"]["Modal"]["ViewBorder"]["Grid"]["DockPanel"]["Content"]["AreaSelectionRoot"]["ContentControl"]["ContentResolver"]["StationSelection"]["StackPanel"]["CodeSelection"]["StackPanel"]["Grid"]["Grid"]["cropSelection"]["CropSelection"]["grid"]["ListBox"]["ListboxitemCorn"]["StackPanel"]["TextblockCorn"]

 

Is there a way to place a variable at the end of this object path for example 

 

Aliases["LocationManager"]["HwndSource_Window"]["WindowLocationManagerQa20151Version116115C"]["PrismShellWindowContent"]["ContentRegion"]["ModalRegionsControl"]["MainContainer"]["ModalContainer"]["Modal"]["ViewBorder"]["Grid"]["DockPanel"]["Content"]["AreaSelectionRoot"]["ContentControl"]["ContentResolver"]["StationSelection"]["StackPanel"]["CodeSelection"]["StackPanel"]["Grid"]["Grid"]["cropSelection"]["CropSelection"]["grid"]["ListBox"]["ListboxitemCorn"]["StackPanel"][%"CROP"%]

 

Then use Set Variable Value within a keyword test to define what the final path would be like 

 

Set variable Value | CROP [Project] | "TextblockCorn"]

 

This way I could use variables within keyword tests to define which which object I would like to select as I test the application

 

 

 

 


Viewing all articles
Browse latest Browse all 21061

Trending Articles