Contributions
Re: Having issues with implementing Page Object Model in TestComplete using Python language
Yo, It comes because you're trying to use an object that's probably not available to you. Yes, because it tries to find that object before it opens the app. It worked after I changed that to a function. But is that possible to have as class attribute not a function? Because I'd like to have all locators as an attributes in separate class and then use them in my tests and perform some actions on them (ex: Click(), SetText ..)?2.1KViews0likes4CommentsHaving issues with implementing Page Object Model in TestComplete using Python language
Using TestComplete with Python to automate Desktop project and trying to implement Page Object Model. Have 2 files: #first file which contains test Test001: importExcelObjects def Test001(): #create object of Excel page class eo = ExcelObjects() #Runs the "EXCEL" tested application. TestedApps.EXCEL.Run(1, True) #Maximize window Sys.Process("EXCEL").Form("Excel").Maximize() #Selects the 'Blank workbook' item of the 'list' select control. eo.blank_workbook.Click() #second file with Page Object which will contain all the locators, methods etc. related to Excel page ExcelObjects class ExcelObjects: blank_workbook = Aliases.EXCEL.wndXLMAIN.FullpageUIHost.ListItem("Blank workbook") And when I run my test it gives me an error: "the object "list" does not exist" so basically it tries to find this object "blank_workbook = Aliases.EXCEL.wndXLMAIN.FullpageUIHost.ListItem("Blank workbook")" even before it runs TestedApp. any thoughts why it calls that object on the beginning but not at the time where it placed (last step of the test)?Solved2.1KViews0likes6Comments- 1.7KViews0likes0Comments
Re: How to select Excel cells by cell name (ex: E5, B10..)?
Tried that but getting "Unable to find the object Cells" error here is my code: def Test1(): #Runs the "EXCEL" tested application. TestedApps.EXCEL.Run(1, True) #Maximizes the 'wndXLMAIN' window. Aliases.EXCEL.wndXLMAIN.Maximize() OCR.Recognize(Aliases.EXCEL.wndXLMAIN.FullpageUIHost.NetUIHWND).BlockByText("Blank workbook").Click() #Clicks the 'Book1' object. Aliases.EXCEL.wndXLMAIN.XLDESK.Cells.Item("4","J").Click()1.8KViews0likes6CommentsHow to select Excel cells by cell name (ex: E5, B10..)?
Trying to select required cells in Excel using TestComplete, and it locates them by position on the screen: #Clicks the 'Book1' object. Aliases.EXCEL.wndXLMAIN.XLDESK.Book1.Click(264, 131) #Clicks the 'Book1' object. Aliases.EXCEL.wndXLMAIN.XLDESK.Book1.Click(69, 248) Is there a way to locate them by their name(ex: E5, B10..)?Solved1.8KViews0likes8CommentsNot able to add objects like "OCR.Recognize(Aliases.EXCEL...).BlockByText("..ook")" to Name Mapping
Using TestComplete to create automate Excel Addins I have trouble to save my objects to Name Mapping OCR.Recognize(Aliases.EXCEL.wndExcel.EXCEL2.toolbar.Ribbon.NUIPane.NetUIHWND).BlockByText("Home").Click() OCR.Recognize(Aliases.EXCEL.wndExcel.EXCEL2.toolbar.Ribbon.NUIPane.NetUIHWND).BlockByText("Insert", spLeftMost).Click() OCR.Recognize(Aliases.EXCEL.wndExcel.EXCEL2.toolbar.Ribbon.NUIPane.NetUIHWND).BlockByText("Page Layout").Click() OCR.Recognize(Aliases.EXCEL.wndExcel.EXCEL2.toolbar.Ribbon.NUIPane.NetUIHWND).BlockByText("Formulas").Click() OCR.Recognize(Aliases.EXCEL.wndExcel.EXCEL2.toolbar.Ribbon.NUIPane.NetUIHWND).BlockByText("Data").Click() OCR.Recognize(Aliases.EXCEL.wndExcel.EXCEL2.toolbar.Ribbon.NUIPane.NetUIHWND).BlockByText("Review").Click() OCR.Recognize(Aliases.EXCEL.wndExcel.EXCEL2.toolbar.Ribbon.NUIPane.NetUIHWND).BlockByText("View", spNearestToCenter).Click() OCR.Recognize(Aliases.EXCEL.wndExcel.EXCEL2.toolbar.Ribbon.NUIPane.NetUIHWND).BlockByText("Help").Click() TestComplete is not adding this objects automatically to the Name Mapping.Solved1.1KViews0likes3Comments