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

Automatic device IP address discovery is broken #1

Open
NickAb opened this issue Apr 10, 2015 · 4 comments
Open

Automatic device IP address discovery is broken #1

NickAb opened this issue Apr 10, 2015 · 4 comments

Comments

@NickAb
Copy link
Contributor

NickAb commented Apr 10, 2015

Device/emulator IP address discovery using GetEndPoint works on emulators, but throws exception when used for device.

@NickAb
Copy link
Contributor Author

NickAb commented Apr 18, 2015

Temporarily solved with capability deviceIpAddress which has to be set manually to ip address of device.

@NickAb NickAb changed the title Device IP address discovery is borken Automatic device IP address discovery is broken Apr 19, 2015
@NickAb
Copy link
Contributor Author

NickAb commented Apr 21, 2015

We can use IpOverUsb. Details in the link https://dev.windowsphone.com/en-US/OEM/docs/Phone_Testing/Configuring_IP_over_USB

  1. Create registry keys to forward ports from device to localhost.
  2. Reconnect device
  3. Use 127.0.0.1 as device ip address
  4. Profit!
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IpOverUsb\Winium]
"DestinationAddress"="127.0.0.1"
"DestinationPort"=dword:0000270e
"LocalAddress"="127.0.0.1"
"LocalPort"=dword:0000270e

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IpOverUsbSdk\Winium]
"DestinationAddress"="127.0.0.1"
"DestinationPort"=dword:0000270e
"LocalAddress"="127.0.0.1"
"LocalPort"=dword:0000270e

Needs further investigation on stability and related issues, but it worked!

@hemalathachundi
Copy link

This works for Emulator, can you please check if this can be done for Devices aswell

Because I found the IPAddress is dynamic for Devices

@NickAb
Copy link
Contributor Author

NickAb commented May 10, 2016

If you are using Winium.StoreApps.CodedUi, then try using deviceIpAddress capability set to localhost.


If you are using modified 2gis/winphonedriver the relevant code is at https://github.com/2gis/winphonedriver/blob/master/WindowsPhoneDriver/WindowsPhoneDriver.OuterDriver/CommandExecutors/NewSessionExecutor.cs#L32. It sohlud be replaced with condition IPAddress assigment (always use localhost for devices, use IPAddress as is for emulators).

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

No branches or pull requests

2 participants