Thanks for the suggestion, I'll look further into Appium.
For now I've solved my problem by setting the user agent in via chrome_options.
I've made a python keyword:
from selenium import webdriver
def get_chrome_mobile_options(self, user_agent_string='Mozilla/5.0 (iPad; CPU OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3'):
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--user-agent={0}".format(user_agent_string))
return chrome_optionsAnd a the test case:
${options}= Get Chrome Mobile Options
Create Webdriver Chrome chrome_options=${options}
Go To http://en.wikipedia.org/wiki/Philosophy
Close Browser And the page is rendered as if by a mobile device (iOS 5.0 in this case).