Contributions
Re: ClickItem TextBlock
Thank you for helping me with this issue. I tried to follow your advice and coded the following using JScript: function Test7() { var arrFeld = ["Mandant", "102 WB Zürich"]; var comboMandant = Aliases.WaloMIS.HwndSource_MainWindow.MainWindow.ContentControl.mainContentControl.UsrParametrizedReportViewer.UsrparameterpanelSystemWindowsControlsItem.ItemsControl.GroupItem.ItemsControl.ComboboxMandant; var comboMandantWPFObject = Aliases.WaloMIS.HwndSource_MainWindow.MainWindow.ContentControl.mainContentControl.UsrParametrizedReportViewer.UsrparameterpanelSystemWindowsControlsItem.ItemsControl.GroupItem.ItemsControl.ComboboxMandant.WPFObject("TextBlock", " ", 1); comboMandantWPFObject.ClickItem (arrFeld[1]); } But on coding variable "comboMandantWPFObject" TestComplete checks this already against my application and reports "Unable to find the object WPFObject("TextBlock", " ", 1)" since there isn't a blank text but "Alle". Regarding the "ClickItem" TestComplete says "The object does not exist" because it doesn't see my "102 WB Zürich" on the WPFObject Textblock but "Alle". If I use the index number 2 instead of"102 WB Zürich", it works. Is my code wrong?765Views0likes0CommentsClickItem TextBlock
With ClickItem I can use an index or a name. Can I use also a TextBlock of an WPFObject? On my application I've to use index "43" to get the date "08/2015". It works right now, but whenthe application will be changed, index "43" can lead me to a total different date. So, I rather like to use "08/2015". I can see this datein my ComboBox: ...ComboboxProfitcenter.WPFObject("TextBlock", "08/2015", 1). How can I use this TextBlock to adjust my ComboBox? Thank you and God bless you804Views0likes2CommentsTimeout on waiting
When I press a button on an application, I've to wait for the answer, i.e. a new panel or menu. Sometimes I get a timeout. UsingaqUtils.Delay(xx) can help, but I'm never sure that I wait long enough. Is there something like a "wait until" where I can check that the expected answer is here? Thank you very much God bless you1KViews0likes3CommentsChange Options Through a Script
Toggling the options "Update DBTable" or "Update Table elements" is very helpful in testing (first build a reference and then (after toggling) comparing to the reference with the same test). Unfortunately this toggling cannot be done automatically (i.e. through a script). This limits the automation of the test. I can build automated tests, but in between I have to toggle manually. This is contradicting the goal to do testing automatically. So, in my opinion switching options through a script is a must to do testing really automatically.1.1KViews0likes0CommentsUnsupported Data Type?
Having a little application ("Profitcenter Mgmt") showing 8 columns of data (see attachment "Profitcenter.png"). Doing a Table Checkpoint it finds all of the 8 column Headers (attachment "Headers"). Trying to store them in pressing "Weiter" ("Continue") it says for the first column ("Mandant") "unsupported data type" with a technical information code (attachment "Unsupported 1"). Looking with "Object Spy" at the first cell of the column I found out that it is a "WPFObject DataGridCell" (also the attachment before). So I unmarked column "Mandant" and it said on the 3rd column "Profitcenter Leiter" "unsupported data type" with an other technical information code (attachment "Unsupported 2"). "Object Spy" said again "WPFObject DataGridCell" (also the attachment before). All the rest of the columns were the same as "Profitcenter Leiter". So, the only column supported was column 2 ("Profitcenter"). This column I could store without any problem. Data was correct and complete. "Object Spy" says "WPFObject TextBlock" (attachment "Supported"). So, can't I read these "DataGridCells" or do I have to do some adjustment or customizing before? I'm using TestComplete 11.1.9KViews0likes3CommentsRe: Why is my Table Update not permanent?
Thank you Joseph. You're right, for some reasons, I don't quite understand, just a copy is updated and after the test everything is lost. Is there a way (an option?) to make the changes permanent? I mean an automated way, through a script or so, and not manually through a dialog.919Views0likes1CommentCan I delete a Table Checkpoint Snapshot through a script?
I've seen I can delete a file with "aqFileSystem.DeleteFile". Knowing the name of my Table Checkpoint Snapshot I can delete it this way. But then TestComplete doesn't know it, still expects the file, and gives an error message. Is there a way to do it automatically and correctly, something like a "aqFileSystem.DeleteTable"?640Views0likes0CommentsRe: How can I change TestComplete Options through a script?
Thank you for the links. I actually knew both of them. The first one shows the "dialog" to change the option. That works fine. But it has to be done manually. I want to do it automatically, through a script or so. But I can't find a way to do it so far. The second one seems to me like a kind of circumvention: To read somehow the data not using a Table Checkpoint, maybe not even using TestComplete and then overwrite the contents of my stored Table Checkpoint Snapshot. But why do I have a tool like TestComplete to do it in such a complicated way? To toggle "Tools, Options, Stores, Update Table elements" works fine and just does, what I want. But why can't I do it automatically? Shouldn't TestComplete help to automate tests?1.5KViews0likes0CommentsWhy is my Table Update not permanent?
I made a Table Checkpoint from application Orders with the addresses given by MyTable.tbl and stored it under the name TestTable2. Then I wrote a little JScript that changes the name in row 5 of TestTable2 ("Samuel Clemens") to "New Cell Value" and compares it to the MyTable.tbl: function Table_Update3() { //Runs the "Orders" tested application. TestedApps.Orders.Run(); //Moves the mouse cursor to the menu item specified and then simulates a single click. Aliases.Orders.MainForm.MainMenu.Click("File|Open..."); //Opens the 'C:\TestComplete\Workshop\MyTable.tbl' file via the 'dlg_ffnen' dialog. Aliases.Orders.dlg_ffnen.OpenFile("C:\\TestComplete\\Workshop\\MyTable.tbl", "Table (*.tbl)"); var Table, Value; // Obtains the Table object Table = Tables.TestTable2; // Changes the value stored in the table Table.Values(5, 0) = "New Cell Value"; // Compares the modified table data with the data displayed by the control Table.Compare(true, lmError); } The Log Entry is as expected: "The "Customer Name" column of row 5 contains a value (Samuel Clemens) that differs from the stored one (New Cell Value)." But looking at TestTable2 afterwards, there is still "Samuel Clemens" and not "New Cell Value". Why is the change just honored during the script but lost afterwards?952Views0likes3Comments