Mobile scripting

Does WPT support scripting on mobile?

I have a private instance, and trying to test the below URL on iphone 5s:
https://search.yahoo.com/search;_ylt=A0SO8ynWKm1T_CAA6Hql87UF;_ylc=X1MDOTU4MTA0NjkEX3IDMgRiY2sDNW9nMGR2bDlodGJ0MyUyNmIlM0Q0JTI2ZCUzRDBsOEQ1T2RwWUVMU3NDa0lUWmJsekF6WFozOU5zNnR4VVQuUU5nLS0lMjZzJTNEMzAlMjZpJTNESF9VTF9FMlBhZzA4Y0dSQmF4NUcEZnIDBGdwcmlkAwRtdGVzdGlkA251bGwEbl9yc2x0AzAEbl9zdWdnAzAEb3JpZ2luA3NlYXJjaC55YWhvby5jb20EcG9zAzAEcHFzdHIDBHBxc3RybAMEcXN0cmwDMwRxdWVyeQNjYXQEdF9zdG1wAzEzOTk2NjMzMjg1MjgEdnRlc3RpZANudWxs?pvid=gD.t_DIwOC5cQA39Ux6vowpxNjYuMlNtKtb_8Pc4&p=cat&fr=sfp&fr2=&iscqry=&tmpl=ASST_M:SA005,CB_M:CBM01,INFRA_M:RHEL6M,UI01_M:MOUS180

I’d like to be able to click the Safari location prompt(s) via script. Is this possible?

No, sorry - the mobile agents do not support scripting.

The newer nodejs agents supress the location UI (on Android) and do allow some level of scripting for page interactions (webdriver) but not some of the richer interactions that you can do with the desktop agents. The iOS support there is still a work in progress though.

Here’s what the same test looks like on the new agents: http://www.webpagetest.org/result/140514_97_N4B/

They have a lot more data, can capture 60fps video of the page loading and have full dev tools timeline integration.

Thanks, Pat.

“The iOS support there is still a work in progress though.”
When do you expect to roll out iOS support?

It’s second on my priority list right now (behind HTTP/2 decode support) mostly because of the expected amount of work. Hopefully by the end of summer but it all depends on how broken the ios-debug-proxy is.

Let’s see if we can bring this thread back to life :slight_smile:

I am frantically working on adding mobile support to our internal WPT service and got a few Android devices going in no time! Then, I quickly stumbled upon the limited support for scripting. Scripting is an absolute must for us because many of our products are hiding behind SSO.

Pat - what does the priority list look like at the moment? I think i saw a number of http/2 related commits fly by and looks like some of your more recent commits include updates to the mobile agent … promising! :slight_smile:

Is there any way we can help? I bet I can find some willing nodejs developers that can contribute to this effort!

Pull requests are always appreciated, particularly is someone knows Node reasonably well. The mobile scripting support is high on my list and I’ll get to it this year but not this quarter (probably just before summer). There’s some basic support for DNS rewriting but not multi-step.

Looks like adding headers would be trivial (there’s a remote debug protocol command for it) if that can help get past the SSO requirement, otherwise adding support for multiple script steps and the exec command are probably the minimal work to get it working.

hey Pat
Just want to check that do you have latest update that when mobile script will be ready? we set up a private instance of Android devices , it is very useful and really want the script function…

Thanks

Pat,

Checking whether iOS Agents support scripting now.

It would be really useful.

Thanks !!

It should support scripting though an issue was filed a couple of days that I need to investigate in case something broke: Multistep doesn't work on new iOS agent · Issue #944 · WPO-Foundation/webpagetest · GitHub

Hi Pat,

Thanks for fixing the iOS scripting functionality.

The script is working with the iOS Agents now.

However, ‘setDns’ command is not working in the script. Even after setting setDns to a specific IP Address, the test is executed against a different IP Address.

How can I fix that?

You can’t currently. There is no way to override dns for iOS. Once reverse-tethering is implemented we may be able to pull something off by running a dns server on the tethered host but that will be a few months at the earliest.