In order to help te test community understand the differences in test tools, I try to make a range just like Flur-Funk did with Tosca. (I used Tosca for a x time in projects)
So now I solve the same puzzles but then with Robot Framework. (I will put them online in Youtube later)
So this one (hard) puzzle I get stuck: This is what I got so far:
*** Settings ***
# https://robotframework-browser.org/
Library Browser
Library DateTime
Library Collections
Library String
#Library SeleniumLibrary
#Library SeleniumLibrary
# https://robotframework.org/robotframework/latest/libraries/DateTime.html
# pip install DateTime
*** Variables ***
@{VALUES} | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
*** Test Cases ***
Example Test 73589
Browser.Open Browser https://obstaclecourse.tricentis.com/Obstacles/73589
${rijmetgetallen}= GET TEXT id=array
LOG TO CONSOLE ${rijmetgetallen}
${stripped}= STRIP STRING ${rijmetgetallen} characters=[,\'n]
${converted}= CONVERT TO LIST ${stripped}
FOR ${var} IN ${stripped}
Run Keyword If '${var}' == '1' Continue For Loop
Click id=b1
LOG TO CONSOLE ${var}
# ELSE Click id=tech
END
Click id=button1
Click id=button2
Get Text xpath=//body *= You solved this automation problem.
# used resources:
# https://www.tutorialspoint.com/robot_framework/robot_framework_working_with_variables.htm
which results in the log:
Example Test 73589 3
2
5
1
9
4
8
6
7
| FAIL |
Evaluating expression ''3
2
5
1
9
4
8
6
7' == '1'' failed: SyntaxError: EOL while scanning string literal (<string>, line 1)
------------------------------------------------------------------------------
0012 Test 73589 | FAIL |
How would you solve this one? How to get past the error?
the solution for the Tosca tool can be found here: https://www.youtube.com/watch?v=BcsuH8Q1x60