I need to run Selenium tests in Firefox Mobile. Could anybody describe an easy way to do this? My investigation shows that:
Did not manage to succeed with any of these solutions. Any idea how to automate Firefox Mobile?
You can try to emulate it on the FireFox Desktop app by using Geckodriver and changing User Agent and device size (width and height). Here is an example in Python 3:
user_agent = "Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16"
profile = webdriver.FirefoxProfile()
profile.set_preference("general.useragent.override", user_agent)
driver = webdriver.Firefox(profile)
driver.set_window_size(360,640)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With