Contributions
Re: While Not/Table Variables issue - keeps resetting
I can now narrow this down specifically to this field... aqObject.CheckProperty(Aliases.PSWizard.wndTfrmWizard.Panel.Panel.PSFormX.GroupBox.ComboBox, "wItemList", cmpContains, Project.Variables.PayFrequency_02d.Iterator("PayDateRule")); The loop works fine if I copy this out or put anything else in it. Also, as part of a general tidy up of my scripts in respect of the Aliases, I can see that the loop-error behaves differently depending on how I specify the component. The following behaviour has been seen consistently (as opposed to the 'random' looping that I thought I was seeing yesterday). aqObject.CheckProperty(Aliases.PSWizard.wndTfrmWizard.Panel.Panel.PSFormX.GroupBox.ComboBox, "wItemList", cmpContains, Project.Variables.PayFrequency_02d.Iterator("PayDateRule")); >> loops through records 1-15, 1-16, 1-16, 1-16...indefinitely. aqObject.CheckProperty(Aliases.PSWizard.wndTfrmWizard.Panel.Panel.PSFormX.GroupBox.ComboBox, "wItemList", cmpContains, Project.Variables.PayFrequency_02d.Iterator("PayDateRule")); >> loops through records 1-19, 2-21, 2-21, 2-21...indefinitely aqObject.CheckProperty(comboBox, "wItemList", cmpContains, Project.Variables.PayFrequency_02d.Iterator("PayDateRule")); >> loops through records 1-20, 2-22, 2-22, 2-22...indefinitely Does that help shed any light? Or is it a red-herring? I know I could use other data sources but storing them locally in the Table Variables seemed ideal.1.1KViews0likes0CommentsRe: While Not/Table Variables issue - keeps resetting
v 8.60.665.7 I'm just passing alphanumerics, no special characters. Your code works on my side too, so that has restored my faith in the process. I'll step through it as you've suggested and see if that highlights any errors on my part. It's a pretty clunky application I'm testing so it's more than conceivable that unexpected behaviour there is causing the issue. But if I was stuck in an infinite loop or the loop bombed out I'd find this easier to get my head around.1.1KViews0likes0CommentsRe: While Not/Table Variables issue - keeps resetting
Thanks for the response. But no, the code is not being called from another routine. So if it did hit an exception I'd just expect it to die rather than start again. When I broke the table variables down into 4 smaller tables (which I then had to call 4 times) it worked okay. I hit a similar problem later in the day where a !While loop ran through 4 columns, but the 6th or 7th iteration picked up row 7 column 1, row 7 column 2, row 7 column 3, but row 1 column 4. Again, my workaround was to break this down into smaller columns and it worked ok. All pretty frustrating.1.1KViews0likes0CommentsWhile Not/Table Variables issue - keeps resetting
I've got a Table Variable with 2 columns and 31 rows. I use those values in the following loop... Project.Variables.PayFrequency_02d.Iterator.Reset(); while (!Project.Variables.PayFrequency_02d.Iterator.IsEOF()) { .ComboBox.ClickItem(Project.Variables.PayFrequency_02d.Iterator("Frequency")); aqObject.CheckProperty(.ComboBox, "wItemList", cmpContains, Project.Variables.PayFrequency_02d.Iterator("PayDateRule")); Project.Variables.PayFrequency_02d.Iterator.Next(); } Any ideas why it doesn't run neatly through rows 1 to 31 (or 0 to 30). It runs 1 to 12, then 2 to 15, and then all gets a bit more random looping between rows 3 and about 20? I saw a similar issue last week with a data loop and a (not-particularly) large table using the Keyword Tests feature, which was when I was given the steer by a colleague to switch to scripting as it was deemed more stable. My workaround has been to break this down into 4 smaller tables and have 4 While! loops instead, which obviously doesn't look pretty and is giving me extra code to maintain. (Even then one of those While! loops iterates through 1 to 4 then 1 to 8 (ie 12 iterations) when there are only 8 records in the table. Thanks.17KViews0likes7CommentsData Driven loop - Boolean Data Type
Hi I'm struggling to use a boolean data type when creating a data driven loop in the Keyword Tests. 1. Create keyword test 2. Select relevant rows to loop 3. Right Click and "Make Data Loop" 4. Create New Variable 5. Select "Table Variable" and click Next. 6. In update values, create 2 columns. (Column 1 to contain the value of an item in a combobox. Column 2 to contain a boolean to check the Enabled value of a field). 6. Table Generation -- here's where I get confused. If I have the Data Type column as "Use Value" and "Value or Settings" as False or True, then the subsequent test run for those items works fine. But I don't want all Falses or all Trues obviously, so in the next screen (the data table itself) I'll overwrite some of the values with True. The tests will then fail along the lines of "Expecting "true"; actual true". Why is it now seeing my True as a string, and how do I make it see it as a boolean as it did do with the dafault value? Many thanks.19KViews0likes1Comment