Mobile Browser Emulation

64 views
Skip to first unread message

Luca Santaniello

unread,
Jan 7, 2016, 11:35:07 AM1/7/16
to Selenium Users
Hi guys,
I need to emulate an mobile platform request, for example iPhone, Android. Is it possible forcing user agent from my JAVA Selenium Project or I must use real device?
Thanks in advance
Luca

PeterJeffreyGale .

unread,
Jan 7, 2016, 11:52:12 AM1/7/16
to seleniu...@googlegroups.com
Yes. You can use Appium or Selendroid locally with the Androud SDK for example, or Sauce Labs/Browser Stack as cloud services.

There will be other options too.

> --
> You received this message because you are subscribed to the Google Groups "Selenium Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
> To post to this group, send email to seleniu...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/1fe82e02-2a05-45b4-bcb7-6d12a554748f%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Luca Santaniello

unread,
Jan 7, 2016, 12:06:16 PM1/7/16
to Selenium Users
Thank you Peter for your reply. Could you please give me futher information? Currently I developed a Java Process to test my webapplication. I want to configure the user agent. Are Appium or Androud tools suitable for me?

Thanks
Luca

PeterJeffreyGale .

unread,
Jan 7, 2016, 1:45:28 PM1/7/16
to seleniu...@googlegroups.com

The.Android SDK would let you launch a virtual mobile device on a PC.

Appium would let you run your Java based scripts against your virtual device.

So you may need both.

David

unread,
Jan 7, 2016, 11:50:25 PM1/7/16
to Selenium Users
If you just want to test mobile web view without much care to specific mobile browser compatibility, you could just fake user agent on desktop browser. You can do that with FirefoxDriver and ChromeDriver, setting their browser profile settings via Java (or command line startup of ChromeDriver). But to effectively test when faking user agent, you may also want to resize browser window (via Selenium) to the target mobile browser size before proceeding with the actual testing, so you do that as part of test setup steps.
Reply all
Reply to author
Forward
0 new messages