Forum Discussion
rraghvani
2 years agoChampion Level 3
This is how I see your code,
def Test2():
button = Aliases.I_Software.HwndSource_HomeScreenWindow.HomeScreenWindow_.RemoveImagesButton
if aqObject.CheckProperty(button.Image, "Enabled", cmpEqual, True):
imageSelector = Aliases.I_Software.HwndSource_ImageSelector.ImageSelector
button.ClickButton()
imageSelector.SelectAllButton.ClickButton()
imageSelector.OKButton.ClickButton()
Aliases.I_Software.HwndSource_HomeScreenWindow.HomeScreenWindow_.ImportImageButton.ClickButton()
Aliases.I_Software.dlgImportImage.OpenFile("C:\\Users\\Test Complete\\Desktop\\Samples\\Samples\\Indian.jpg")
Aliases.I_Software.HwndSource_MessageBox.MessageBox.OKYesButton.ClickButton()
listView = Aliases.I_Software.HwndSource_HomeScreenWindow.HomeScreenWindow_.GalleryList
listView.HScroll.Pos = 0
listView.DblClickItem(0)
If TestComplete is not able to find the object on screen, then it means your actions are not correctly defined or your name mappings may have changed. Debug and step through the code, at the point of failure, check the name mapping and ensure TestComplete is able to identify the correct object.
Also, you might need to have a wait statement, for dlgImportImage to appear.
- aafreen_jamadar2 years agoOccasional Contributor
How do I check if the name mapping has changed?
I just can't seem to understand what's causing this.
Related Content
- 3 years ago
- 2 years ago
Recent Discussions
- 3 hours ago
- 2 days ago