after launching WebDriverAgent , the next script does't execute, strunk in. #7668

Open
wangtao169447 opened this Issue Jan 10, 2017 · 12 comments

Projects

None yet

4 participants

@wangtao169447

The problem

real device, ios , (iOS 9.3.5 or iOS 10.1.1)
i can run WebDriverAgent in real device, and when i run appium script, after launching webdriveragent, there is nothing to print ,and appium does not work

Environment

  • Appium version (or git revision) that exhibits the issue:1.6.3
  • Last Appium version that did not exhibit the issue (if applicable):none
  • Desktop OS/version used to run Appium:Mac OS
  • Node.js version (unless using Appium.app|exe):6.3.0
  • Mobile platform/version under test:
  • Real device or emulator/simulator:Real device
  • Appium CLI or Appium.app|exe:

Details

after launching WebDriverAgent , the next script does't execute, strunk in.

Link to Appium logs

https://gist.github.com/wangtao169447/b55eaef8555660bc68392ac77d1f8d15

@triager triager added the NeedsTriage label Jan 10, 2017
@mykola-mokhnach
Collaborator

Can you try it with updated appium-xcuitest-driver component. Set its version to 2.5.1/2.5.0

@wangtao169447
wangtao169447 commented Jan 10, 2017 edited

@mykola-mokhnach
i'd like to update appium-xcuitest-driver, but i don't know how to update appium-xcuitest-driver to 2.5.1/2.5.0?

thanks!

i just execute npm install -g appium

but the appium-xcuitest-driver 's version is 2.4.2

@mykola-mokhnach
Collaborator
mykola-mokhnach commented Jan 10, 2017 edited
npm uninstall -g appium && npm install -g appium --no-shrinkwrap

This will update all the components. And if you want only xcuitest driver to be updated:

cd /usr/local/lib/node_modules/appium/node_modules/
npm remove appium-xcuitest-driver
npm install appium-xcuitest-driver@2.5.2
@wangtao169447

thanks very much!
i will update all components

and then, i will try to execute appium script on real device;
and give you the execute results.

@wangtao169447

@mykola-mokhnach
:)
after i update all components as your advise

the appium script runs well!

thanks

and i have a question that
#7641
we konw the solution to solve this kind of problem, but why don't merge the change in the branch of WebDriverAgent?

@mykola-mokhnach
Collaborator
mykola-mokhnach commented Jan 10, 2017 edited

@wangtao169447 Because Appium team does not have a control over WDA project. It's maintained by Facebook developers and we just create pull requests there or report bugs and they decide what to merge and do code reviews. You can try to convince Facebook dudes yourself if you want an issue fix to be merged/reviewed faster ;)

https://github.com/facebook/WebDriverAgent/issues
https://github.com/facebook/WebDriverAgent/pulls

@wangtao169447

@mykola-mokhnach ok

and i have a problem about ios UIAutomation .

after i run a appium script , there create a lot of files in this dictory "/Users/wangtao169447/Library/Developer/Xcode/DerivedData/WebDriverAgent-abmfbvfzvqhslmgulbhfapoduvfs"
image
image

however, after i run a appium script of android uiautomation, did't creat a log of tmp files;

and i wonder how to do with this kind of problem?

thanks :)

@mykola-mokhnach
Collaborator
mykola-mokhnach commented Jan 10, 2017 edited

Set either preventWDAAttachments or clearSystemFiles capability to True. See https://github.com/appium/appium-xcuitest-driver#usage for more details

@wangtao169447
wangtao169447 commented Jan 10, 2017 edited

@mykola-mokhnach
thanks for your introduce. and i will have a try , and read the usage. :)

i also find that in iOS UIAutomate, it runs very slow and use much CPU and Memory resources than Android UIAutomate ; and slower than the former UIAutomation framework after i changed to XCUITest.

i found it is xcodebuild use a lot of CPU & Memory resources

i wonder the reason why the UIAutomate become slow is because the XCUITest?
and the increase of the resource usage is also because the XCUITest?

because i found it is really very slow. and i want to do something to speed up

#7660

and i also wonder there have some ways to hide the keyboard like android UIAutomate ,use Appium Android input XXXX app?
set capability like
"unicodeKeyboard":true,
"resetKeyboard":true,

@wangtao169447

You can try to convince Facebook dudes yourself if you want an issue fix to be merged/reviewed faster ;)

OK,i will have a try.
and i tried the solution, found the solution works well. and the faster they merge the solution , it will help more people.

and i also write a blog to introduce the solution in chinese , and hope it can help more people . :)

@HemantTrivedi

@wangtao169447 , I am facing the issues with launching the test on real device .I have ran the following sample code to check whether the appium is perfectly installed.

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("platformName", "iOS");
capabilities.setCapability("platformVersion", "10.0");
capabilities.setCapability("deviceName", "2539729a3603b0f7e9065bf21d650c38d39923cb");
capabilities.setCapability("automationName", "XCUITest");
capabilities.setCapability("udid","2539729a3603b0f7e9065bf21d650c38d39923cb");

capabilities.setCapability("realDeviceLogger", "/Users/macbookpro/npm-global/lib/node_modules/deviceconsole/deviceconsole");

System.out.println("driver initialized");

driver = new IOSDriver(new URL("http://0.0.0.0:4723/wd/hub"), capabilities);
System.out.println("driver over");

Now I have following doubts 👍

  1. Do I need to add any extra capability to run my test on iPad air 2 with ios 10.1
  2. I have ios 10.1 in my device but setting 10.1 in capability gives some xcode error .

It would be helpful if anyone code provide sample code to run appium on real device .

Thanks.

@wangtao169447

@HemantTrivedi
I think you can have a try ,like this page : https://github.com/appium/appium-xcuitest-driver

have a try, and good luck!

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