Contributions
Re: Using local variable in Script Routine.
Yes, hard coded is a path to the file. In my case file path can be different and it will cause an error, so I want to use keyword variable instead of file path. 'KeywordTests.CurrentTestItems.Variables['test_variable']' is a keyword test variable: Which I'm using as parameter in for my script routine:11 months agoPlace TestComplete QuestionsTestComplete Questions395Views0likes0CommentsRe: Using local variable in Script Routine.
No this is different issue. In the issue from link I wasn't able to click a button. That issue I figured out. But I was using hard coded path to csv file, now I want to replace hard coded value to a local variable, which is: csv_path = KeywordTests.CurrentTestItems.Variables['test_variable'] After I replaced I got the error. For me it looks like it doesn't recognize 'KeywordTests.CurrentTestItems.Variables['test_variable']' as a keyword test variable, but I can be wrong. As I mentioned above on screenshot I use a parameter for my script routine, maybe I did mistake there. This is my first time I'm trying parametrizescript routine.11 months agoPlace TestComplete QuestionsTestComplete Questions424Views0likes0CommentsUsing local variable in Script Routine.
Hello all, In my keyword test I use Run Script Routine. The script should click on the QT button, the value of the button stored in the csv file under"TC_Organism_button" column. I'm trying to parametrize the script routine that when I want to click different button I need to change the value of the button only in csv file not in test. In script routine I have variable which uses local keyword variable as a value: # Get the CSV file path from the 'test_variable' keyword test variable csv_path = KeywordTests.CurrentTestItems.Variables['test_variable'] # Call the function to click the button using the object path from the first row of the CSV file click_organism_from_csv(csv_path) Then in script routine as a parameter I specify the column as a value - "TC_Organism_button". Then when I'm running the script routine I get the error: What does this error mean and how to fix it?Solved11 months agoPlace TestComplete QuestionsTestComplete Questions471Views0likes5CommentsRe: Test execution fails after I modified variable of a ClickButton operation.
I'm not using a Shift, it's by default. I just showed here that TC uses key as a value, maybe it accepts only key as value for this operation. I was using a variable and when I was using a variable it didn't work because of Exception -Type mismatch. Maybe this is a reason why it says "Type mismatch." because variable is a different type. I can't find any information. I created TC support ticket yesterday about this, but didn't get a respond yet.11 months agoPlace TestComplete QuestionsTestComplete Questions347Views0likes0CommentsRe: Test execution fails after I modified variable of a ClickButton operation.
Also, I just found in TC documentation that Shift is a button: Parameters The method has the following parameter: Shift Specifies the key that will be pressed during the click. SeeTShiftKey. Now I'm confused, can I even use a variable for ClickButton operation if it refers to a key not to the object? From documentation: "You can click a button by simulating keystrokes that represent an access key. An access key is an underlined symbol within the button caption. It permits a click of a button by pressing theALTkey in combination with the assigned access key. For example, if the underlined symbol isF, you should simulate pressing theALT+Fkey combination (for detailed information about simulating keystrokes, see theSimulating Keystrokestopic)."11 months agoPlace TestComplete QuestionsTestComplete Questions383Views0likes0CommentsRe: Test execution fails after I modified variable of a ClickButton operation.
I found that I can do it under Operation Parameters: This is how my test step looks like(it's a different button, but concept is the same): When I run it I keep getting an Exception error: "Unable to evaluate the operation's "Shift" parameter. Error: RuntimeError: The specified object is not indexable"11 months agoPlace TestComplete QuestionsTestComplete Questions390Views0likes0CommentsRe: Test execution fails after I modified variable of a ClickButton operation.
Yes, that's exactly what I want! My test should create 6 different projects, where each project is == to a different button("Aliases.IsoSpeak.MainOptionsModule.centralWidget.uiLayoutWidget.NewProjectMenuModule.Widget3.Widget.ToolButton2"), in total there are 6 buttons. So, I will have 6 lines with values in my DB Table, later I plan to make it data driven loop. I never usedeval() will check it now.11 months agoPlace TestComplete QuestionsTestComplete Questions393Views1like0CommentsRe: Data Driven Loop doesn't returns to the beginning of the test.
Not it works, but not how I need to. I have DDL test: step 1 step 2 step 3 step 4 If...Then run test A Else run test B Now it executes all 4 steps, then it gets to If statement, which is True, then it runs test A. After that it runs again 4 DDL steps(that's what I need) but then it runs again test A. It shouldn't run test A, as condition is False now. It should run test B. My test creates a new project, where project name is a variable stored in csv file, this is what my data driven loop does, each line in csv file is a project name. After I created first project A, it should run DDL test where it reads project name from csv file, then I store project name into a variable X, then it gets to the condition where I check if variable X is == project name, in instance if X==new project1 then run test A, if X==new project2 then run test B. Every time when it runs through DDL steps it takes a project name as "new project1", "new project2", "new project3" and "new project4". It stores it into variable X, then it compares if X==new project1, and so on. In my If statement condition I have If X == "variable from DB Table", I'm expecting that it compares X with value in DB Table, this is new project1, new project2, basically those values are the same as I use for data driven loop(DDL).11 months agoPlace TestComplete QuestionsTestComplete Questions390Views0likes1CommentRe: Test execution fails after I modified variable of a ClickButton operation.
The idea is that"Aliases.IsoSpeak.MainOptionsModule.centralWidget.uiLayoutWidget.NewProjectMenuModule.Widget3.Widget.ToolButton2" value = ToolButton. I have 2 buttons and I want to use the same test where I can click two different buttons. I will store the buttons value inProjectSuite.Variables.Config_DDL_Meteor["TC_Chip_button"] DB Table.11 months agoPlace TestComplete QuestionsTestComplete Questions423Views0likes0Comments- 11 months agoPlace TestComplete QuestionsTestComplete Questions613Views0likes0Comments