robotframework - How do I set values for variables in my .robot file through PHP? -
basically, want web testing through robot framework. however, have user change variables without needing edit .robot file.
here part of using:
`*** settings *** library selenium2library` `*** variables *** ${homepage} http://"website-name"/ ${browser} chrome ${username} ***** ${password} ***** ${delay} 10 ${login} link=login`
i user able change variables such ${username} or ${password} through front end landing page i've set up. these data in php via form enter.
the problem is, still have no idea how inject these variables .robot file.
you can edit variables via command line. suspect create command line command fire off test via php input, , fire off.
php input > command containing variable edit > fires off test desired variables
you can via --variable
option on command line firing off tests. in case this:
robot --variable username:username test.robot
how in php, down you... --variable variable_name:value
direction take.
read more here.
you want capture input user via php. inject input --variable
option on command line, , php fire off python / robot you. that's do.
any questions please ask.
Comments
Post a Comment