Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add commands to set network connection #67

Open
NickAb opened this issue Aug 5, 2015 · 1 comment
Open

Add commands to set network connection #67

NickAb opened this issue Aug 5, 2015 · 1 comment

Comments

@NickAb
Copy link
Contributor

NickAb commented Aug 5, 2015

Add commands to switch phone network off, set it to different speed limits, etc.
See related sections in:
https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#value-alias-------data--wifi--airplane-mode-
https://code.google.com/p/selenium/source/browse/spec-draft.md?repo=mobile#104

@NickAb NickAb self-assigned this Aug 7, 2015
@NickAb
Copy link
Contributor Author

NickAb commented Aug 11, 2015

Programmatic network throttling can be achieved using classes from %PROGRAMFILES(X86)%\Microsoft XDE\8.1\Microsoft.Xde.Interface.dll](Microsoft.Xde.Interface.dll

using Microsoft.Xde.Interface;
//...
client = AutomationClient.CreateAutomationClient(this.emulatorVm.Name);
client.IsNetworkSimulationEnabled = true
client.NetThrottlingSpeed = NetworkThrottlingSpeed.NoNetwork;

But network throttling will affect InnerServer and, if network is turned off, render it unable to respond to Driver commands.

Further research is need on how to bypass network throttling for InnerServer <-> Driver communications. XDE itself uses network connection to interact with Emulator, so it is possible to bypass throttling, but it is unclear how to do so at the moment.

One easy solution will be switching from network communications to file based communications. This will give following benefits:

  • No more dependence on network
  • No need to determine emulator/device IP address
  • No need to bind on random free port an communicate port back to Driver

Drawbacks:

  • Most likely file communications will require some kind of polling, instead of clear event based solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant