TestDataField and RadioButtons - how to variable them
I have an external csv file that I read in and put all data into fields in my pgm.
However, I also want to code for test cases where RadioA button is 'leftSingleClicked'.
I've tried using parameters in the CSV file such as:
"RadioA", 'Left SingleClick', other parms...
and then in the transform file, do
RadioButton fieldArray, fieldArray ,
but every time i run it, it can't seem to do it.
Re: TestDataField and RadioButtons - how to variable them
We have something similar for EditBoxes, instead of using EditText, we have a function called SetEditText (). This looks like the original but it act differently depending on the contents of the second parameter.
It mean we can pass things like SetEditText("Edit1", "Today") and it will derive todays date and enter that instead of the word "Today".
You could do something similar.
In your file have "RadioA::Left"
and a function ClickRadioButton (szButton)
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">Function Main
Function ClickRadioButton (szButton)
If FindStr (szButton, "::" != 0 Then
//Strip out either side
szRtStr = Right (szButton, Length (szButton) - FindStr("szButton, "::" - 1)
szBtnName = Left (szButton, FindStr("szButton, "::" - 1 )
RadioButton (szBtnName, "Left SingleClick"
RadioButton (szBtnName, "Right SingleClick"
End Function</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">This may need a bit of tweaking as I don't have QARun on my kit to try it out, but the concept should give you an idea.
Hope this helps....