Run Keyword if ${ENV} == local Open Browser ${url} ${browser}
Run Keyword if ${ENV} == browserstack Open Browser https://localhost:3000 ${browser} remote_url=${COMMAND_BROWSERSTACK} desired_capabilities=${DESIRED_CAPABILITIES_BROWSERSTACK}
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at http://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.
The expression must be a valid python expression. "browserstack == local" isn't valid unless you have python variables named browserstack and local. Since you're doing string comparisons, you need to add quotes around those values:Run Keyword if "${ENV}" == "local" Open Browser ${url} ${browser}
On Mon, Jun 29, 2015 at 3:02 AM, N.T. <n.to...@iuj.jp> wrote:
For my scripts, I need to be able to switch between running locally or running my scripts through BrowserStackSo I have a variable used to tell the RobotFramework which one to run. called ${ENV}. This is placed in a separate variable file that gets importedThis is how it's setup on my script:Run Keyword if ${ENV} == local Open Browser ${url} ${browser}
Run Keyword if ${ENV} == browserstack Open Browser https://localhost:3000 ${browser} remote_url=${COMMAND_BROWSERSTACK} desired_capabilities=${DESIRED_CAPABILITIES_BROWSERSTACK}When I run my scripts, I get this error:20150629 16:15:42.785 : FAIL : Evaluating expression 'browserstack == local' failed: NameError: name 'browserstack' is not definedAm not quite sure how to fix this. I understand that Python has a different way or reading this scenario but I can't think of a better workaround or how to make this work for me. I need to know how because I might have cases where I can only run certain steps if, say for example am running my script on a mobile environment. So I would sayRun Keyword if ${mobile} == trueHelp is most appreciated as always. Thanks!
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
It amazes me how simple the solution was.
It works now. Thanks so much!
On Monday, June 29, 2015 at 8:11:22 PM UTC+9, Bryan Oakley wrote:
The expression must be a valid python expression. "browserstack == local" isn't valid unless you have python variables named browserstack and local. Since you're doing string comparisons, you need to add quotes around those values:Run Keyword if "${ENV}" == "local" Open Browser ${url} ${browser}
On Mon, Jun 29, 2015 at 3:02 AM, N.T. <n.to...@iuj.jp> wrote:
For my scripts, I need to be able to switch between running locally or running my scripts through BrowserStackSo I have a variable used to tell the RobotFramework which one to run. called ${ENV}. This is placed in a separate variable file that gets importedThis is how it's setup on my script:Run Keyword if ${ENV} == local Open Browser ${url} ${browser}
Run Keyword if ${ENV} == browserstack Open Browser https://localhost:3000 ${browser} remote_url=${COMMAND_BROWSERSTACK} desired_capabilities=${DESIRED_CAPABILITIES_BROWSERSTACK}When I run my scripts, I get this error:20150629 16:15:42.785 : FAIL : Evaluating expression 'browserstack == local' failed: NameError: name 'browserstack' is not definedAm not quite sure how to fix this. I understand that Python has a different way or reading this scenario but I can't think of a better workaround or how to make this work for me. I need to know how because I might have cases where I can only run certain steps if, say for example am running my script on a mobile environment. So I would sayRun Keyword if ${mobile} == trueHelp is most appreciated as always. Thanks!
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at http://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.