Code Monkey home page Code Monkey logo

ios-driver's Introduction

ios-driver

IOS native, hybrid and web automation

doc : http://ios-driver.github.com/ios-driver/

Contact

Most of discussions take place via IRC at freenode on the ios-driver channel

Contributing

Active development is done on the 'dev' branch. Please make use that branch and make pull requests to it instead of to master.

Please sign the CLA "Personal", "Corporate".

The "release notes" contain a list of TODOs at the bottom.

Building from source :

clone the project

clone the submobule ( git submodule init, git submodule update )

switch to the dev branch

build without the tests : mvn package -DskipTests

The server standalone will be in project/server/target

License

The Apache Software License, Version 2.0

ios-driver's People

Contributors

abhijit1234 avatar adataylor avatar darraghgrace avatar derekngo avatar federicoviscomi avatar freynaud avatar heliojr avatar iamleeg avatar illicitonion avatar imccarten1 avatar jasonprado avatar johnhammerlund avatar kcoons avatar krmahadevan avatar kumaravel-jayakumar avatar lawrencelomax avatar legneato avatar lukeis avatar mmmulani avatar nicegraham avatar nirvdrum avatar pavrda avatar rsalvador avatar samuelhorwitz avatar slawert avatar thanhcs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ios-driver's Issues

How to execute tests on a real device?

Hello François,

at first you do a great job here in helping iOS testers to get rid of Automation as primary interface for testing on iOS. Adding a more familar abstraction level with the Selenium FW is such an improvement especially for the integration into an already existing Java/Eclipse test environment. Thanks a lot for that!

But lets get to the point: Because of the missing documentation it's not really clear to me how to exectue a test on a real device. For testing a web app on an iOS device with Selenium i needed the web driver app which handled the app on the remote device over a network connection. Due to the mapping of Selenium requests to UIAutomation actions there's no "remote handler" on the device for that will be done by Automation.

The main question is: How do it tell the ios-driver that he should use the USB connected device for testing instead of the app on the local machine? I thought it would be similar to testing on the emulator but obviously it's not :)
I built the app with Intstruments and targeted it to the connected device. Afterwards i copied the built app from "DerivedData" to a more comfortable directory, started the server with the app as input parameter and started the tests. To initialize the driver i used the following commands (as you stated in your example):

IOSCapabilities cap = IOSCapabilities.iphone("PatientSmartphoneApp", "1.0");
driver = new RemoteUIADriver(new URL("http://localhost:4444/wd/hub"), cap);

It would be great to hear from you as soon as possible.

Thanks in advance and nice greetings
Robert

If a click triggers new page load the page is not waited to finish loading

The idea about page loading in WebDriver is that the script/client shouldn't worry about the page ready state. In ios-driver webDriver.get() waits for the new page to load. However if later the script clicks to an element for example select new option from select menu which triggers new page to load ios-driver doesn't wait for loading to complete and returns control to client. This can in turn cause the script to throw an error if checks for an element present on the page.

Not able to connect to Safari on iphone simulator after following documentation

I have followed the documentation on this page - http://ios-driver.github.io/ios-driver/safari.html but have not been able to connect to the simulator. Steps I have followed:

sudo chmod 666 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator*.sdk/Applications/MobileSafari.app/Info.plist

I then start up selenium-standalone 2.32 on port 3001. I then run the sample code provided on the ios-driver site:

public static void main(String[] args) throws Exception {
DesiredCapabilities safari = IOSCapabilities.iphone("Safari");
RemoteWebDriver driver = new RemoteWebDriver(new URL("http://localhost:3001/wd/hub"), safari);

driver.get("http://www.ebay.co.uk/");

System.out.println(driver.getTitle());
driver.quit();

}

I get "unable to connect" error. Am I supposed to install webdriver on the simulator/device as well which I think is how the IPhoneDriver works?

I am using OSX Mountain Lion with all up-to-date software.

Thanks

sendKeys likely implemented incorrectly

Looking at http://code.google.com/p/selenium/wiki/JsonWireProtocol#POST_/session/:sessionId/element/:id/value and http://code.google.com/p/selenium/wiki/JsonWireProtocol#POST_/session/:sessionId/keys the spec says the commands take an array of characters and should flatten them into a string before sending. What the code currently does is takes the first array element (which is a character). This doesn't seem to spec. I have a patch to fix, but it depends on how we want to implement it.

I'm curious about the tradeoffs of writing the values directly versus explicitly tapping them on the keyboard. It is unclear if I should a) synthesize native keyboard tap commands per character or b) instead use the API to put the whole value there. You can tell the difference in automation, because for a) the keyboard comes up and you see the taps (and it takes longer) and for b) the keyboard merely flashes when the text element gets focus and the whole string is inserted (like a copy+paste). There might be subtle behavior changes or bugs exposed by going either way.

WebDriverException: cannot find command for GET

Hey @freynaud

I am able to run ios-driver perfectly well on one of my apps. I tried setting up the tests with a new one but am seeing the following when i try to access "http://localhost:4444/wd/hub" (Wonder if i missed any step here):

org.openqa.selenium.WebDriverException: cannot find command for GET, /
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.7.5', java.version: '1.6.0_37'
Driver info: driver.version: unknown
at org.uiautomation.ios.communication.WebDriverLikeCommand.getCommand(WebDriverLikeCommand.java:286)
at org.uiautomation.ios.communication.WebDriverLikeRequest.getGenericCommand(WebDriverLikeRequest.java:115)
at org.uiautomation.ios.communication.WebDriverLikeRequest.getVariableValue(WebDriverLikeRequest.java:119)
at org.uiautomation.ios.communication.WebDriverLikeRequest.getSession(WebDriverLikeRequest.java:132)
at org.uiautomation.ios.server.servlet.IOSServlet.getResponse(IOSServlet.java:139)
at org.uiautomation.ios.server.servlet.IOSServlet.process(IOSServlet.java:83)
at org.uiautomation.ios.server.servlet.IOSServlet.doGet(IOSServlet.java:45)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:533)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:475)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:920)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:403)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:184)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:856)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:47)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114)
at org.eclipse.jetty.server.Server.handle(Server.java:352)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:596)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1049)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:590)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:212)
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:510)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:450)
at java.lang.Thread.run(Thread.java:680)

Import maven project from dev repo, dependency problem

Hi again,

Thanks for the fast response to my previous question. I have now cloned from the dev repo and tried to import all the projects into eclipse. However I am running into a dependency problem with ios-selenium-tests and ios-server.

Missing artifact org.uiautomation:ios-driver-jni:jar:0.7-SNAPSHOT pom.xml

I am quite new to this area, where can i find this artifact ?

Thanks!

low issue: new device iPhone21

as suggested on thread per issue so:

on the development version I was getting an empty page when calling
http://0.0.0.0:5555/wd/hub/status

I added the enumeration "iPhone21" at the ios-common module
at org.uiautomation.ios.communication.devices.DeviceVariation

simply because I was testing on an iPhone21 which was missing in the enumeration

refactor xpath for native apps

xpath is defined on the server and not on the app.
Because there is no ui element equality, the entire tree has to be fetched each time an xpath expression is evaluated, ie it's not possible to search for children of a node.

NPE matching up session after hitting home button

I started up a session and then hit the home button so I could do some inspection. The inspector is unable to find the session once that happens:

java.lang.NullPointerException
    at org.uiautomation.ios.inspector.controllers.SessionGuesserController.canHandle(SessionGuesserController.java:43)
    at org.uiautomation.ios.inspector.IDEServlet.getController(IDEServlet.java:106)
    at org.uiautomation.ios.inspector.IDEServlet.doGet(IDEServlet.java:94)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:533)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:475)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:920)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:403)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:184)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:856)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
    at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:47)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114)
    at org.eclipse.jetty.server.Server.handle(Server.java:352)
    at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:596)
    at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1049)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:590)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:212)
    at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:510)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:450)
    at java.lang.Thread.run(Thread.java:722)

Error starting ios-server using the -beta flag

java -jar ios-server-0.7.0-SNAPSHOT.jar -beta -hub http://build.ecom.at:4444/grid/register -host 10.0.10.124 -port 5555
loading lib /generated/libiosdriver.dylib
loading lib /generated/libiosdriver.dylib
Cannot find /generated/libiosdriver.dylib as a pre-generated artefact.
Exception in thread "main" java.lang.ExceptionInInitializerError
    at org.uiautomation.iosdriver.services.jnitools.JNIService.<clinit>(JNIService.java:8)
    at org.uiautomation.ios.server.IOSServerManager.<init>(IOSServerManager.java:58)
    at org.uiautomation.ios.server.IOSServer.init(IOSServer.java:115)
    at org.uiautomation.ios.server.IOSServer.init(IOSServer.java:88)
    at org.uiautomation.ios.server.IOSServer.<init>(IOSServer.java:61)
    at org.uiautomation.ios.server.IOSServer.main(IOSServer.java:65)
Caused by: org.uiautomation.iosdriver.IOSDriverServiceException: Cannot find /generated/libiosdriver.dylib as a pre-generated artefact.
    at org.uiautomation.iosdriver.services.jnitools.JniLoader.extractFromJar(JniLoader.java:43)
    at org.uiautomation.iosdriver.services.jnitools.JniLoader.<init>(JniLoader.java:23)
    at org.uiautomation.iosdriver.services.jnitools.JniLoader.<clinit>(JniLoader.java:15)
    ... 6 more

driver.switchTo().alert().sendKeys("") is not working.

First of all,

Kudos for making such a great effort to share your tools with fellow Automation Engineers community.

Now to my question:

I have a Native alert which shows up when I click a button on my iOS App. I want to type (sendkeys) in the text box which shows as an alert to the user. I am using : driver.switchTo().alert().sendKeys("Test") but its not working. Is there something I am doing wrong?

Also if this feature is under development, Is there a work around ?

How to open a HTTPS page with invalid security cerificate

I'd like to open a secure page but the server's certificate is not valid and Safari displays a warning "Cannot verify server entity".
If I click continue then safari would remember the site as trusted but on the next session ios-driver would delete all custom data. I tried to accept this message as Alert but it didn't workout. Is there a way to accept the message or to mark that site as trusted or to disable this check.
img_0047

iOS driver does't work with iOS app whose Localizable.strings file is in text format rather than binary

@freynaud,

The Localizable.strings file of my target iOS app is in text format. When I tried to use iOS driver 0.6.0 with the app, I got the following error:

Exception in thread "main" org.openqa.selenium.WebDriverException: error loading content for l10n
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.7.4', java.version: '1.6.0_41'
Driver info: driver.version: unknown
at org.uiautomation.ios.server.application.APPIOSApplication.loadAllContent(APPIOSApplication.java:168)
at org.uiautomation.ios.server.application.APPIOSApplication.(APPIOSApplication.java:61)
at org.uiautomation.ios.server.application.APPIOSApplication.createFrom(APPIOSApplication.java:470)
at org.uiautomation.ios.server.IOSServer.init(IOSServer.java:129)
at org.uiautomation.ios.server.IOSServer.init(IOSServer.java:88)
at org.uiautomation.ios.server.IOSServer.(IOSServer.java:61)
at org.uiautomation.ios.server.IOSServer.main(IOSServer.java:65)
Caused by: org.openqa.selenium.WebDriverException: Cannot parse info.plist : The given data is no binary property list. Wrong magic bytes: "App.ver
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.7.4', java.version: '1.6.0_41'
Driver info: driver.version: unknown
at org.uiautomation.ios.utils.PlistFileUtils.read(PlistFileUtils.java:50)
at org.uiautomation.ios.utils.PlistFileUtils.(PlistFileUtils.java:41)
at org.uiautomation.ios.server.application.LanguageDictionary.readContentFromBinaryFile(LanguageDictionary.java:195)
at org.uiautomation.ios.server.application.APPIOSApplication.loadAllContent(APPIOSApplication.java:165)
... 6 more
Caused by: java.lang.Exception: The given data is no binary property list. Wrong magic bytes: "App.ver
at com.dd.plist.BinaryPropertyListParser.doParse(BinaryPropertyListParser.java:86)
at com.dd.plist.BinaryPropertyListParser.parse(BinaryPropertyListParser.java:73)
at com.dd.plist.BinaryPropertyListParser.parse(BinaryPropertyListParser.java:136)
at com.dd.plist.BinaryPropertyListParser.parse(BinaryPropertyListParser.java:149)
at org.uiautomation.ios.utils.PlistFileUtils.read(PlistFileUtils.java:48)
... 9 more

In iOS driver PlistFileUtils.java there is one line of code trying to parse binary files, as shown in "Place A" below.

private Map read(File bplist) {
NSObject object = null;
try {
object = BinaryPropertyListParser.parse(bplist); // <--- Place A
} catch (Exception e) {
throw new WebDriverException("Cannot parse info.plist : " + e.getMessage(), e);
}
ApplicationInfo info = new ApplicationInfo(object);
return info.getProperties();
}

But when I tried to use iOS driver against the iOS app, the line of code throws an exception because the file bplist is not binary.

My non-binary file is in Build/Products/Debug-iphonesimulator/XoomApp.app/en.lproj/Localizable.strings (when I use bash file command to inspect this file, it is :ASCII English text, with very long lines).

It seems that the text format of the target app is also right because the app's localization works well. So maybe iOS driver would like to add support on this case?

Thanks,

Xuyuan

Cannot open URLs with in-url authorization

When try to open url like http://user:[email protected] a warning about fraudulent site appears. This can be disabled through the safari's setting however each time the simulator is started these settings are reset. Can you provide a way to either reuse settings through sessions or disable the warning

"build": {
"revision": "7fc89bb6547d85a55c9ea7caabc50c9343c8be3a",
"time": "20130327-1606",
"version": "0.6.0"
},
"ios": {"simulatorVersion": "6.1"},
"java": {"version": "1.6.0_45"},
"os": {
"arch": "x86_64",
"name": "Mac OS X",
"version": "10.8.3"
},

Having issue with testing real devices

Hi there,

I have an issue with starting the test with real devices. Here is the situation:

  1. I start the ios driver and start my test
  2. OS version is mountain lion (10.8.3)
  3. Instruments version is: 4.6
  4. Xcode version is: 4.6
  5. I have made sure the instruments are all closed before I start the test
  6. xcodebuild -showsdks
    OS X SDKs:
    Mac OS X 10.7 -sdk macosx10.7
    OS X 10.8 -sdk macosx10.8

iOS SDKs:
iOS 6.1 -sdk iphoneos6.1

iOS Simulator SDKs:
Simulator - iOS 5.0 -sdk iphonesimulator5.0
Simulator - iOS 5.1 -sdk iphonesimulator5.1
Simulator - iOS 6.0 -sdk iphonesimulator6.0
Simulator - iOS 6.1 -sdk iphonesimulator6.1

Problem:

The application under test starts when the remote driver is being initialized and then after a 1 minute or so, I see the following error:

org.openqa.selenium.SessionNotCreatedException: error starting instrument for session b25c2fb8-2bd5-4c1a-a4b3-7b095a4ae6b7, Instruments crashed.
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.8.3', java.version: '1.6.0_45'
Driver info: driver.version: unknown
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.8.3', java.version: '1.6.0_45'
Driver info: driver.version: unknown
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.8.3', java.version: '1.6.0_45'
Driver info: driver.version: unknown
Command duration or timeout: 99.67 seconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.8.2', java.version: '1.6.0_37'
Driver info: org.uiautomation.ios.client.uiamodels.impl.RemoteIOSDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:187)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:151)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:111)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:129)
at org.uiautomation.ios.client.uiamodels.impl.RemoteIOSDriver.(RemoteIOSDriver.java:78)
at com.ebay.e2e.mobiletest.MobileTest.App.getMobileLoggingDriver(App.java:55)
at com.ebay.e2e.mobiletest.MobileTest.App.main(App.java:28)

Here is the code for instantiating the driver:

IOSCapabilities cap = null;
cap = IOSCapabilities.iphone("appname","version");
cap.setCapability(IOSCapabilities.DEVICE, DeviceType.iphone);
cap.setCapability(IOSCapabilities.SIMULATOR, false);
cap.setCapability(IOSCapabilities.UUID,"c014d7a680b8a2608d2ca6247b261baadbdad6bd");
WebDriver driver = new RemoteIOSDriver(new URL("http://iosHubUrl:iosPort/wd/hub"), cap);

On the console where the driver is started, I see the following error:

19:56:391 WARNING DefaultCommandListener.stderr objc[45333]: Object 0x7ff6b2402bd0 of class NSUserDefaults autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug
java.io.IOException: Bad file descriptor
at java.io.FileInputStream.readBytes(Native Method)
at java.io.FileInputStream.read(FileInputStream.java:220)
at java.lang.UNIXProcess$DeferredCloseInputStream.read(UNIXProcess.java:227)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.BufferedReader.fill(BufferedReader.java:136)
at java.io.BufferedReader.readLine(BufferedReader.java:299)
at java.io.BufferedReader.readLine(BufferedReader.java:362)
at org.uiautomation.ios.utils.Command$2.run(Command.java:135)
at java.lang.Thread.run(Thread.java:680)
java.io.IOException: Stream closed
at java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:145)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:255)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.BufferedReader.fill(BufferedReader.java:136)
at java.io.BufferedReader.readLine(BufferedReader.java:299)
at java.io.BufferedReader.readLine(BufferedReader.java:362)
at org.uiautomation.ios.utils.Command$2.run(Command.java:135)
at java.lang.Thread.run(Thread.java:680)

Your help will be much appreciated.

Error forwarding the new session new session request for webdriver should contain a location header with the session

updated so theres only one issue per thread:

whenever I start my junit test on jenkins (hub) I receive the error

org.openqa.selenium.WebDriverException: Error forwarding the new session new session request for webdriver should contain a location header with the session.
Command duration or timeout: 171 milliseconds
Build info: version: '2.31.0', revision: '1bd294d', time: '2013-02-27 20:53:56'
System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_25'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:187)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:111)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:129)
    at ecx.io.qs.selenium.tests.TestIphone.setUp(TestIphone.java:58)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

I suspect it has something to do with
http://code.google.com/p/selenium/source/browse/java/server/src/org/openqa/grid/internal/TestSession.java?r=fecf74aee85e9f8bf2a16174420504d37723c345&spec=svnbc1dba867ee457554a3413198a1ee595ef223191
at Method updateHubIfNewWebDriverSession (the only method returning such a message) receiving an empty Location header

I also had a look at the ios-driver module server
at org.uiautomation.ios.server.servlet.IOSServlet
the only location the responseHeader for "location" beeing set.

Just for testing reason I commented out the IF-clause and repackaged the files.
After doing so I still got some exception, but it was different from the one before. So I suspect it has to do something about this code block receiving that mentioned errormessage.

Question about Selenium Grid (Hub) integration on Jenkins

Greetings,

Background:
I'm running a selenium grid as a jenkins plugin (selenium-server-standalone Grid Hub 2.25.0)
I was already able to register multiple instances of Nodes via -role node from the selenium standalone jar file on the jenkins grid (hub) and specified all capabilities in a json file needed for registering successfully via the parameter -configNode {jsonfile.json}
My achievement was to connect to the node responsible for a physical (iphone 3G) connected device, via the grid (hub) on jenkins that forwards java unit-tests to the node and do some Browser Tests on some external application (specified at the unit-test files using selenium)

Problem:
I'm having troubles registering the ios-driver node on the selenium-server standalone grid on jenkins integrated.

when I start the ios-server
java -jar ios-server-0.6.0.jar -beta -hub http://{jenkins-servername}:4444/grid/register -host 10.0.10.106 -port 5555
specifying the jenkins-server grid beeing the hub - it successfully shows up on my list at
http://{jenkins-servername}:4444/grid/console

However unlike the other nodes it shows information such as
"BaseRemoteProxylistening on http://10.0.10.106:5555test session time out after 300 sec.
Supports up to 1 concurrent tests from : "
Usually there should be a list (with icons of the browsers) of capabilities but its empty.

during the first startup of the ios-server-0.6.0 I received following errors:

29:52:698 INFO ApplicationStore. App archive folder:/Users/xxx/Development/selenium/applications
loading lib /generated/libiosdriver.jnilib
29:53:663 WARNING IPAApplication.createFrom /Users/xxx/Development/selenium/applications/com.adobe.shadow.ipaapp added.
29:54:362 WARNING AppleLocale.findBestLocale id isn't recognized.Please file a bug on github.You won't be able to start the app in that language.
29:55:215 INFO IOSServer.init
Beta features enabled ( enabled by -beta flag ): true
Inspector: http://0.0.0.0:5555/inspector/
tests can access the server at http://0.0.0.0:5555/wd/hub
server status: http://0.0.0.0:5555/wd/hub/status
Connected devices: http://0.0.0.0:5555/wd/hub/devices/all
Applications: http://0.0.0.0:5555/wd/hub/applications/all
Capabilities: http://0.0.0.0:5555/wd/hub/capabilities/all
Monitoring '/Users/xxx/Development/selenium/applications' for new applications
using xcode install : /Applications/Xcode.app
using IOS version 6.1
Archived apps /Users/xxx/Development/selenium/applications
ios >= 6.0. Safari and hybrid apps are supported.

Applications :

CFBundleName=Adobe Edge Inspect,CFBundleVersion=1.0.416
CFBundleName=Safari,CFBundleVersion=8536.25

2013-04-24 10:29:55.215:INFO::jetty-7.x.y-SNAPSHOT
2013-04-24 10:29:55.537:INFO::Started [email protected]:5555
key BoardId is null.
key ChipID is null.
29:56:262 INFO DeviceStore.onDeviceAdded ADDED : iPhone von xxx,IOS 4.3.5[088fd27f2fbac91ae3925250a116019b7e1be522]
Exception in thread "main" org.openqa.selenium.WebDriverException: Error sending the registration request.
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.7.5', java.version: '1.7.0_04'
Driver info: driver.version: unknown
at org.uiautomation.ios.server.grid.RegistrationRequest.registerToHub(RegistrationRequest.java:80)
at org.uiautomation.ios.server.IOSServer.main(IOSServer.java:73)
Caused by: java.lang.RuntimeException: Error sending the registration request.
at org.uiautomation.ios.server.grid.RegistrationRequest.registerToHub(RegistrationRequest.java:77)
... 1 more

but on the second time - there were no error messages at all (I supposed because the Node was still registered (in a wrong way?) on the grid)

Questions:
a) is there any way to use the ios-server-0.6.0.jar file just like the selenium server standalone file to send capabilities via a json configuration file? I'd consider this to be quite useful, because currently there is no such parameter like -configNode

b) Regarding my problem I'm quite unsure is it even possible to achieve this with the current version of the ios-server-0.6.0 or is it just not implemented to work like the way I want it to work?

To illustrate the infrastructure plan:
structurePlan

Cannot connect to app if it returns an empty list of supported languages

If the AUT returns an empty list of languages then it's impossible to create a new session. Either an exception is thrown because "en" can't be found in the list of languages, or, if the capabilities have the language nulled out, an exception of "org.openqa.selenium.SessionNotCreatedException: Cannot find null in the supported languages for the app." is thrown.

Licence not clear

Some files have an Apache 2.0 licence at the top, and some have no licence information at all.

The root of the project has no LICENCE file.

What is the licence for the project as a whole?

Application Under Test is terminated in the simulator on loading the inspector.

Application Under Test (AUT) got terminated, on loading the inspector (http://localhost:4444/inspector/).
There is no exception / error info at the server console.

After that, as an alternative, in the code, I have used getPageSource() to view the page details. Following is observed.
Once application is loaded (after authentication), on issuing getPageSource(), kills the application in the simulator. Got the following exception
trace at the server end.

org.json.JSONException: JSONObject["translation"] not found.
at org.json.JSONObject.get(JSONObject.java:499)
at org.json.JSONObject.getBoolean(JSONObject.java:515)
at org.uiautomation.ios.server.command.uiautomation.LogElementTreeNHandler.(LogElementTreeNHandler.java:52)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.uiautomation.ios.server.CommandMapping.createHandler(CommandMapping.java:297)
at org.uiautomation.ios.server.servlet.IOSServlet.getResponse(IOSServlet.java:131)
at org.uiautomation.ios.server.servlet.IOSServlet.process(IOSServlet.java:83)
at org.uiautomation.ios.server.servlet.IOSServlet.doGet(IOSServlet.java:45)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:533)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:475)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:920)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:403)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:184)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:856)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:47)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114)
at org.eclipse.jetty.server.Server.handle(Server.java:352)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:596)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1049)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:590)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:212)
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:510)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:450)
at java.lang.Thread.run(Thread.java:680)
org.openqa.selenium.WebDriverException: bug.null
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.8', java.version: '1.6.0_37'
Driver info: driver.version: unknown
at org.uiautomation.ios.server.servlet.IOSServlet.getResponse(IOSServlet.java:153)
at org.uiautomation.ios.server.servlet.IOSServlet.process(IOSServlet.java:83)
at org.uiautomation.ios.server.servlet.IOSServlet.doGet(IOSServlet.java:45)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:533)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:475)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:920)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:403)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:184)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:856)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:47)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114)
at org.eclipse.jetty.server.Server.handle(Server.java:352)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:596)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1049)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:590)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:212)
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:510)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:450)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.uiautomation.ios.server.CommandMapping.createHandler(CommandMapping.java:297)
at org.uiautomation.ios.server.servlet.IOSServlet.getResponse(IOSServlet.java:131)
... 25 more
Caused by: org.openqa.selenium.WebDriverException: wrong params
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.8', java.version: '1.6.0_37'
Driver info: driver.version: unknown
at org.uiautomation.ios.server.command.uiautomation.LogElementTreeNHandler.(LogElementTreeNHandler.java:65)
... 31 more
Caused by: org.json.JSONException: JSONObject["attachScreenshot"] not found.
at org.json.JSONObject.get(JSONObject.java:499)
at org.json.JSONObject.getBoolean(JSONObject.java:515)
at org.uiautomation.ios.server.command.uiautomation.LogElementTreeNHandler.(LogElementTreeNHandler.java:61)
... 31 more

UIAElement.isStale:scrollToVisible() is causing problems

scrollToVisible() is called when doing read-like actions on an element i.e. element.getAttribute() or element,findElement() and this causes problems if the element is not visible (behind some other element). Also doing an element.getAttribute("..") makes the element scroll into view which is not what one would expect.

Only committers can build

The libimodule-java submodule was added using an SSH git path, meaning the only people that can clone this project and build it are those that have commit privileges. It'd be good if non-committers could build as well.

WebDriverLikeCommand Error after registering successfully on hub

Hello @nicegraham

regarding the issue on my topic "Question about Selenium Grid (Hub) integration on Jenkins":
thank you for the patch you provided, I can now successfully see the node registered on the hub.

Sadly I seem to get a followup-error:

at org.uiautomation.ios.communication.WebDriverLikeCommand.getCommand(WebDriverLikeCommand.java:300)
at org.uiautomation.ios.communication.WebDriverLikeRequest.getGenericCommand(WebDriverLikeRequest.java:115)
at org.uiautomation.ios.communication.WebDriverLikeRequest.getVariableValue(WebDriverLikeRequest.java:119)
at org.uiautomation.ios.communication.WebDriverLikeRequest.getSession(WebDriverLikeRequest.java:132)
at org.uiautomation.ios.server.servlet.IOSServlet.getResponse(IOSServlet.java:137)
at org.uiautomation.ios.server.servlet.IOSServlet.process(IOSServlet.java:82)
at org.uiautomation.ios.server.servlet.IOSServlet.doGet(IOSServlet.java:45)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:533)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:475)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:920)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:403)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:184)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:856)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:47)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114)
at org.eclipse.jetty.server.Server.handle(Server.java:352)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:596)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1049)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:590)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:212)
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:510)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:450)
at java.lang.Thread.run(Thread.java:722)

any hints about that?

Exception executing JavaScript

I see an exception in the server log sometimes when running "execute_javascript." This doesn't manifest as a client error immediately, but it's in the logs nonetheless:

java.lang.NullPointerException
    at org.uiautomation.ios.wkrdp.message.BaseIOSWebKitMessage.(BaseIOSWebKitMessage.java:17)
    at org.uiautomation.ios.wkrdp.message.MessageFactory.create(MessageFactory.java:37)
    at org.uiautomation.ios.wkrdp.internal.DefaultMessageHandler.process(DefaultMessageHandler.java:73)
    at org.uiautomation.ios.wkrdp.internal.DefaultMessageHandler.access$000(DefaultMessageHandler.java:31)
    at org.uiautomation.ios.wkrdp.internal.DefaultMessageHandler$1.run(DefaultMessageHandler.java:64)

Testing webpages with mobile safari

Hi,

I am trying to automate testing of web pages on mobile safari with ipad simulator. Calling click() on a WebElement works fine, however when trying to call getLocation(), I get a server error:

org.openqa.selenium.WebDriverException: cannot find command for GET, /session/db7596f7-88c8-470d-ad00-d3055a111024/element/1_9/location

It seems to me that some functionalities of WebElement isn't available but I might be mistaken.

Is there another approach to getting the location of a html element? Ultimately, I would like to perform drag or page scroll.

Thanks!

libimobile-java module seems missing

@freynaud

In the highest level of pom.xml in the iOS driver 0.6.0 source code, there are six modules:

<modules>
    <module>common</module>
    <module>client</module>
    <module>libimobile-java</module>   <!--Seems missing-->
    <module>server</module> 
    <module>ios-selenium-tests</module>
    <module>grid</module>
</modules>

But I cannot find libimobile-java. Just curious that where to find this module please? Currently I added ios-server-0.6.0.jar as a library of the project as a work around.

Thanks,

Xuyuan

Shows blank when I open the inspector url

Here is the exception :

10:38:231 WARNING IOSSimulatorManager.restoreExiledSDKs /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/exiledSDKs doesn't exist.Cannot move folders from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs to /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/exiledSDKs Make sure the rights are correct (chmod -R +rw ... )
11:59:600 WARNING IOSSimulatorManager.restoreExiledSDKs /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/exiledSDKs doesn't exist.Cannot move folders from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs to /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/exiledSDKs Make sure the rights are correct (chmod -R +rw ... )
java.lang.NullPointerException
at org.uiautomation.ios.inspector.controllers.SessionGuesserController.canHandle(SessionGuesserController.java:43)
at org.uiautomation.ios.inspector.IDEServlet.getController(IDEServlet.java:106)
at org.uiautomation.ios.inspector.IDEServlet.doGet(IDEServlet.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:533)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:475)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:920)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:403)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:184)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:856)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:47)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114)
at org.eclipse.jetty.server.Server.handle(Server.java:352)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:596)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1049)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:590)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:212)
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:510)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:450)
at java.lang.Thread.run(Thread.java:722)
13:17:082 WARNING IDEServlet.doGet null

Installed Applications are not visible

Testing with real device ipad .I have installed application on my device by xcode but,
Installed Applications are not visible on page http://localhost:5555/wd/hub/devices/all
i have followed all setup steps given on page http://ios-driver.github.io/ios-driver/setup.html

i'm using ios-server-0.6.0.jar and my code is

IOSCapabilities cap = IOSCapabilities.ipad("InternationalMountains", "1.1");
cap.setCapability(IOSCapabilities.DEVICE, DeviceType.ipad);
cap.setCapability(IOSCapabilities.SIMULATOR, false);
cap.setCapability(IOSCapabilities.UUID,"uuid");
WebDriver driver = new RemoteIOSDriver(new URL("http://localhost:5555/wd/hub"), cap);

any help will be appreciated most

Application name is blank

The application name may come back as "" when then name should come from the app's CFBundleDisplayName value rather than its CFBundleName value. E.g., Safari suffers from this.

Need some information

Hi!

Can you please tell how to create the correct DesiredCapabilities object for test native applications on Python.

tried

a = webdriver.DesiredCapabilities.IPAD
a ['browserName'] = 'appCFBundleName'
a ['version'] = '1 .0

An error in IDE:

selenium.common.exceptions.WebDriverException: Message: u"Cannot cast null to DeviceType\nBuild info: version: 'unknown', revision: 'unknown', time: 'unknown'\nSystem info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.8', java.version: '1.6.0_35'\nDriver info: driver.version: unknown\nBuild info: version: 'unknown', revision: 'unknown', time: 'unknown'\nSystem info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.8', java.version: '1.6.0_35'\nDriver info: driver.version: unknown" ; Stacktrace: Method handle threw an error in NewSessionNHandler.java

ios-server-0.6.0
python 2.7
selenium 2.31.0

P.S. Is there a forum where can ask questions like this?

Timing out with large JS execution

I have a need to serialize the DOM to JSON in mobile Safari and do so through "execute_script". It may take a while to process for large pages and result in a large response payload. Currently I'm seeing the client time out in such cases with the following response payload:

{"message"=>"timeout waiting for a response for request id : 15\nBuild info: version: 'unknown', revision: 'unknown', time: 'unknown'\nSystem info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.8.3', java.version: '1.7.0_21'\nDriver info: driver.version: unknown", "screen"=>nil, "class"=>"org.openqa.selenium.WebDriverException", "stackTrace"=>[{"fileName"=>"DefaultWebKitResponseFinder.java", "lineNumber"=>52, "className"=>"org.uiautomation.ios.wkrdp.internal.DefaultWebKitResponseFinder", "methodName"=>"startSearch"}, {"fileName"=>"ResponseFinderList.java", "lineNumber"=>55, "className"=>"org.uiautomation.ios.wkrdp.ResponseFinderList$1", "methodName"=>"run"}, {"fileName"=>"Thread.java", "lineNumber"=>722, "className"=>"java.lang.Thread", "methodName"=>"run"}]}

WebDriverException: bug.null while trying to open the inspector

Hey @freynaud

I had gotten the http://localhost:4444/inspector/ working earlier with your help on my app. But for some reason, today it doesn't seem to work and i haven't changed anything. And my test is running and/or paused when im trying to do this.

SYMPTOMS:
When i go to "http://localhost:4444/inspector/", i actually get redirected to "http://localhost:4444/inspector/session//home"

IOS-SERVER logs:
org.openqa.selenium.WebDriverException: bug.null
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.7.5', java.version: '1.6.0_37'
Driver info: driver.version: unknown
at org.uiautomation.ios.server.servlet.IOSServlet.getResponse(IOSServlet.java:153)
at org.uiautomation.ios.server.servlet.IOSServlet.process(IOSServlet.java:83)
at org.uiautomation.ios.server.servlet.IOSServlet.doGet(IOSServlet.java:45)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:533)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:475)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:920)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:403)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:184)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:856)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:47)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114)
at org.eclipse.jetty.server.Server.handle(Server.java:352)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:596)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:1066)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:805)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218)
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:510)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:450)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.uiautomation.ios.server.CommandMapping.createHandler(CommandMapping.java:297)
at org.uiautomation.ios.server.servlet.IOSServlet.getResponse(IOSServlet.java:131)
... 25 more
Caused by: org.openqa.selenium.WebDriverException: Cannot find session on the sesver.
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.7.5', java.version: '1.6.0_37'
Driver info: driver.version: IOSDriver
at org.uiautomation.ios.server.IOSDriver.getSession(IOSDriver.java:192)
at org.uiautomation.ios.server.command.BaseCommandHandler.(BaseCommandHandler.java:42)
at org.uiautomation.ios.server.command.BaseNativeCommandHandler.(BaseNativeCommandHandler.java:23)
at org.uiautomation.ios.server.command.UIAScriptHandler.(UIAScriptHandler.java:31)
at org.uiautomation.ios.server.command.uiautomation.LogElementTreeNHandler.(LogElementTreeNHandler.java:42)
... 31 more
org.openqa.selenium.WebDriverException: java.lang.ClassCastException: java.lang.String cannot be cast to org.openqa.selenium.remote.Response
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.7.5', java.version: '1.6.0_37'
Driver info: driver.version: RemoteUIADriver
at org.uiautomation.ios.client.uiamodels.impl.RemoteUIADriver.execute(RemoteUIADriver.java:201)
at org.uiautomation.ios.client.uiamodels.impl.RemoteUIADriver.logElementTree(RemoteUIADriver.java:213)
at org.uiautomation.ios.inspector.model.IDESessionModelImpl.refresh(IDESessionModelImpl.java:77)
at org.uiautomation.ios.inspector.controllers.IDEController.handle(IDEController.java:43)
at org.uiautomation.ios.inspector.IDEServlet.doGet(IDEServlet.java:93)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:533)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:475)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:920)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:403)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:184)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:856)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:47)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:114)
at org.eclipse.jetty.server.Server.handle(Server.java:352)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:596)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1049)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:590)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:212)
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:426)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:510)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(SelectChannelEndPoint.java:34)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:450)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to org.openqa.selenium.remote.Response
at org.uiautomation.ios.communication.Helper.exctractResponse(Helper.java:58)
at org.uiautomation.ios.client.uiamodels.impl.RemoteUIADriver.execute(RemoteUIADriver.java:199)
... 27 more
16:37:666 WARNING IDEServlet.doGet java.lang.ClassCastException: java.lang.String cannot be cast to org.openqa.selenium.remote.Response
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.7.5', java.version: '1.6.0_37'
Driver info: driver.version: RemoteUIADriver

What is the magic behind the "ARCHIVE" link on the http://localhost:5555/wd/hub/devices/all page?

Hey guys,

this is more sort of a question than an issue, but for completly automate a test on a real device vie the CLI i need to know what magic is executed when i press the "ARCHIVE" link below the desired application on http://localhost:5555/wd/hub/devices/all.
After some research in the code base it seemed to me, that method behind that button simply builds a CLI command with all necessary parameters and executes it afterwards. Am i correct?
It would be great to get some more information on this topic especially with focus on test automation.

Thanks in advance
Robert

Exception in thread "main" org.openqa.selenium.WebDriverException: no support for pt-PT

Hey freynaud,

Thanks for the help earlier to get the InternationMountains app working. I am now trying to start the server on the app i am working on and i get the following error:

Jayeshs-MacBook-Pro:Downloads jayeshpatil$ java -jar ios-server-0.5.0.jar -aut ../Documents/TaggedIOSApps/Tagged.app/ -port 4444
Exception in thread "main" org.openqa.selenium.WebDriverException: no support for pt-PT
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.7.5', java.version: '1.6.0_37'
Driver info: driver.version: unknown
at org.uiautomation.ios.server.application.AppleLocale.(AppleLocale.java:86)
at org.uiautomation.ios.server.application.LanguageDictionary.(LanguageDictionary.java:54)
at org.uiautomation.ios.server.application.IOSApplication.loadAllContent(IOSApplication.java:152)
at org.uiautomation.ios.server.application.IOSApplication.(IOSApplication.java:62)
at org.uiautomation.ios.server.IOSServer.init(IOSServer.java:94)
at org.uiautomation.ios.server.IOSServer.init(IOSServer.java:72)
at org.uiautomation.ios.server.IOSServer.(IOSServer.java:62)
at org.uiautomation.ios.server.IOSServer.main(IOSServer.java:44)

Any pointers?

Question: Any plans to make this available for .NET?

We have built all of our automation stack using .NET and Selenium WebDriver. We are looking to use ios-server to automation iPad Hybrid apps and Safari on iPad.

I was able to translate (through ikvmc) and include the ios-server jar file as a reference in our .NET project. However, the implementations and namespaces you have conflict with Selenium WebDriver's namespace.

Are there any plans to make this available and working for .NET consumers?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.