Contributions
Is it possible to place a variable within an object path and use the Set Variable Value to define?
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 applicationSolved970Views0likes2CommentsRe: How to use keyword statement While Loop based on if an Onscreen Object is visible?
djadhav, I will keep looking into why test complete was unable to see the object on screen, but I did take your advice and change my test so itappends a timestamp on the endand it works great. Thanks for all the help. Chris876Views0likes0CommentsRe: How to use keyword statement While Loop based on if an Onscreen Object is visible?
Well if Obj_A Equals Obj_A.Visible it means an error has occurred in that the name I am trying to create already exists, so by incrementing the number on the end of the name I hope to find a name that is not currently used and create a record for that name. Once the application finds a name that is not in use the error in the application will disappear thus creating a record with a unique name and breaking out of the loop. So basically I am trying to enter a unique record into a database through the application, which has built in error checking to verify the record name is unique in the form of the object error message that is only visible if the record name is not unique.3.6KViews0likes2CommentsRe: How to use keyword statement While Loop based on if an Onscreen Object is visible?
My loop details are set as follows Aliases.LocationManager.HwndSource_Window3.WindowLocationManagerQaHw20151Version11431.PrismShellWindowContent.ContentRegion.ModalRegionsControl.MainContainer.DockPanel.ContentRegion.SPMContentRoot.Grid.SPMContentRegion.DefaultViewUserControl.BarManager.RootPanel.RootLayoutManager.LayoutRoot.Properties.ContentControl.Site.LayoutRoot.DockPanel.SiteInformationExpander.ContentPresenter.Border Equals Aliases.LocationManager.HwndSource_Window3.WindowLocationManagerQaHw20151Version11431.PrismShellWindowContent.ContentRegion.ModalRegionsControl.MainContainer.DockPanel.ContentRegion.SPMContentRoot.Grid.SPMContentRegion.DefaultViewUserControl.BarManager.RootPanel.RootLayoutManager.LayoutRoot.Properties.ContentControl.Site.LayoutRoot.DockPanel.SiteInformationExpander.ContentPresenter.Border.Visible If this criteria is met it should jump into the loop and perform the following actions. Increment variable by +1 Show log message that shows current value of variable Concatenate "AutomatedTest" with new variable integer and enter the value in an input box If there is no entry in the database with the same name the object error will not be visable and should break out of the loop.3.6KViews0likes4CommentsRe: How to use keyword statement While Loop based on if an Onscreen Object is visible?
djadhav, I have attached two screenshots one is the keyword steps I am performing in TC and the second is of the application, error that stats "A site named "AutomatedTest1" already exists" is what i am trying to verify is visible. If I highlight this object from within the while loop to test that it can find it, tesct complete successfully highlightsthe object. Also ifI change the While Loop to does not equal the test jumps into the loop and successfully runs through the steps butis not able tobreak out ofthe loop. Thanks, Chris3.7KViews0likes8CommentsHow to use keyword statement While Loop based on if an Onscreen Object is visible?
I am testing a desktop app and trying to use a while loop to run a series of steps if an object is visible on screen, in this case it is an error that shows up if I a username has been used. Right now I have tried the verifying the object is enabled when that did not work I tried verifying the object was visible. Both in both cased the test did not recognize the object on screen and jumped out of the loop. My loop details are set as follows Aliases.LocationManager.HwndSource_Window3.WindowLocationManagerQaHw20151Version11431.PrismShellWindowContent.ContentRegion.ModalRegionsControl.MainContainer.DockPanel.ContentRegion.SPMContentRoot.Grid.SPMContentRegion.DefaultViewUserControl.BarManager.RootPanel.RootLayoutManager.LayoutRoot.Properties.ContentControl.Site.LayoutRoot.DockPanel.SiteInformationExpander.ContentPresenter.Border Equals Aliases.LocationManager.HwndSource_Window3.WindowLocationManagerQaHw20151Version11431.PrismShellWindowContent.ContentRegion.ModalRegionsControl.MainContainer.DockPanel.ContentRegion.SPMContentRoot.Grid.SPMContentRegion.DefaultViewUserControl.BarManager.RootPanel.RootLayoutManager.LayoutRoot.Properties.ContentControl.Site.LayoutRoot.DockPanel.SiteInformationExpander.ContentPresenter.Border.Visible If I change the condition to “Does Not Equal”, then the test stays within the loop running the steps over and over again. Any help on how to successfully perform a While Loop based on Onscreen Object would be appreciated. Thanks, ChrisSolved3.9KViews0likes10Comments