Parameterized test step
I have a page that displays links for different charts:
I would like to have a parameterized keyword test step that will take each of these links as a parameter. That way I can write one test and have it run however many times as needed. I'm not sure how to do this and I'm looking for suggestions. If possible, I would like to avoid scripting for this. I'm sure I could come up with some JS that could accomplish this, but I would like a way to do it using a keyword test.
Solved! Go to Solution.
@Marsha_R I've looked at this and I run into issues at this step:
I'm using CSS selectors for name mapping, and I do not see how I can do this step.
See if this article helps - section "To use variables in selectors"
You can use a variable to drive the selector - this could even work in a datadriven loop if thats something you are looking to do.
I have created a project level table variable named chartCategory:
I have referenced the variable in name mapping as described here:
I have tried with and without single quotes, I have tried with and without a column name and I keep getting this error:
Not sure what I am doing wrong, but I can't seem to get it to work.
I believe the issue here is the variable type - for this you will have to use a string type variable.
You can use a set variable value step to iterate through a table - here is a somewhat similar tutorial that applies a similar concept: https://support.smartbear.com/testcomplete/docs/testing-with/data-driven/tutorials/keyword/modifying...
Alright, I got it working. Had to change the variable type to string and also had to make it a persistent variable, wasn't working when I had it as a temporary variable. Thank you so much for you assistance!