ncbi / robotframework-pageobjects

Implementation of the Page Object pattern with Robot Framework and selenium. Also facilitates page object pattern independent of Robot Framework
http://ncbi.github.io/robotframework-pageobjects
Other
84 stars 75 forks source link

config variables shouldn't be case sensitive #29

Open boakley opened 9 years ago

boakley commented 9 years ago

In our environment we define a ${BROWSER} robot variable in an argument file (eg: --variable BROWSER:chrome). We use uppercase as a way to designate this is a global variable. However, it is not being recognized when I use page objects -- it insists on using phantomjs. If I change our argument file to use the lowercase variable name it works, and our browser definition is used.

In other words, this works:

--variable browser:chrome

This doesn't:

--variable BROWSER:chrome

This seems inconsistent, since robot variables are case-insensitive. It was particular puzzling because my other option was to set the all-uppercaae environment variable PO_BROWSER. It would be nice if the page objects machinery supported both lowercase and uppercase variables for setting options.

kahunacohen commented 9 years ago

This makes sense. Pull request is welcome. I'd look here: https://github.com/ncbi/robotframework-pageobjects/blob/master/robotpageobjects/optionhandler.py for starters. Let us know if you need any more hints.