Hello, first time posting here. I have a case where I want to generate a random number and use it in byValue selection. To be more specific, first I want to generate a random number on the fly (I used your VB code found in: http://docs.telerik.com/teststudio/advanced-topics/coded-samples/general/generate-random-number), then use this number to pick the number available from the dropdown menu.
I searched all over the docs, here and found nothing that would be useful to me. Example what I have in the test:
1. ...
2. Extract selection 'ByValue' on 'PriceCat' into DataBindVariable $(PriceCatValue)
3. [Add_to_cart_CodedStep1] : Generate random number between 1-5 $(randomNr):
Dim random As New System.Random()
Dim randomNr As Integer = random.[Next](1, 5)
4. Select 'ByText' option '1' on 'PriceCat' - DataDriven: [$(PriceCatValue)] <- here I want to use randomNr instead of "option '1'", like for example "option '$(randomNr)'"
Hopefully I'm specific enough.
Thanks!
I searched all over the docs, here and found nothing that would be useful to me. Example what I have in the test:
1. ...
2. Extract selection 'ByValue' on 'PriceCat' into DataBindVariable $(PriceCatValue)
3. [Add_to_cart_CodedStep1] : Generate random number between 1-5 $(randomNr):
Dim random As New System.Random()
Dim randomNr As Integer = random.[Next](1, 5)
4. Select 'ByText' option '1' on 'PriceCat' - DataDriven: [$(PriceCatValue)] <- here I want to use randomNr instead of "option '1'", like for example "option '$(randomNr)'"
Hopefully I'm specific enough.
Thanks!