My tests are written in python using selenium and Chrome, here is what I want to do in a .robot:
Start New Session
Perform test 1
Perform test 2
Is this possible? Because what happens is every subsequent line has forgotten there is a web browser open and crashes. I tried saving it in python as self.driver but that gets erased. To make it work I created a ${DRIVER} variable in the robot file and then have the Suite setup output ${DRIVER} and then I pass ${DRIVER} into every test.
*** Variables ***
${DRIVER}
*** Keywords ***
Start New Session
${DRIVER} ${fail} = Open Browser ${ADDR} ${DRIVER_LOCATION}
run keyword if ${fail}==1 fatal error
Set Suite Variable ${DRIVER}
reset_demo ${DRIVER}
begin_demo ${DRIVER}
Perform Test 1
abc ${DRIVER}
xyz ${DRIVER}
etc.
It works but it's ugly. I thought the whole point of Robot Framework is to look like natural language, so it seems like there should be a less kludgy way to do this. I've googled it every way I can think of and found nothing, perhaps I don't know the vocabulary.
Selenium2LibraryorSeleniumLibrary, or are you writing your own?open browserkeyword written in python, or is it a robot keyword?