Appium not navigating to right URL - selenium-webdriver

So I have installed appium by following these instructions: https://github.com/angular/protractor/blob/master/docs/mobile-setup.md
I also have a protractor test that is working perfectly. However my problem is when I launch the test, it initiates the iOS simulator and launches safari perfectly, but always goes to http://0.0.0.0:4723/welcome first. Once it goes to that, after another 30 sec, it goes to my test and executes fine. The problem more specifically is when it is going to http://0.0.0.0:4723/welcome, since I am behind a corporate proxy, the page navigates to a captcha page which I have to manually enter. If I don't, it wont initiate my test and gets stuck at http://0.0.0.0:4723/welcome. I don't even know where this url (http://0.0.0.0:4723/welcome) is coming from. I want to remove this first initial test. I think it is something defaulted in Appium. This is my console output:
[debug] [RemoteDebugger] Received response from socket send: '["PID:29882",
{"1":{"WIRTitleKey":"Page verifica...'
[debug] [RemoteDebugger] Page changed: {"1":{"WIRTitleKey":"Page
verification","WIRTypeKey":"WIRTypeWeb","WIRURLKey":
"https://captcha.gecirtnotification.com/pitc/}}
[debug] [RemoteDebugger] Received app, but expected url
('http://0.0.0.0:4723/welcome') was not found. Trying again.
[debug] [RemoteDebugger] Found app id key 'PID:29880' for bundle
'com.apple.mobilesafari'
[debug] [RemoteDebugger] Found separate bundleId
'com.apple.WebKit.WebContent' acting as proxy for 'com.apple.mobilesafari',
with app id 'PID:29882'
[debug] [RemoteDebugger] Trying out the possible app ids: PID:29882
[debug] [RemoteDebugger] Selecting app PID:29882 (try #17 of 20)
[debug] [RemoteDebugger] Sending '_rpc_forwardGetListing:' message to remote
debugger

Related

Appium - Unable to launch WebDriverAgent because of xcodebuild failure: Scripts/bootstrap.sh code 1

I am using webdriver.IO together with Appium to test an iOS hybrid App.
I get the following error before each test when it tries to spin up the iOS App:
Unable to launch WebDriverAgent because of xcodebuild failure: "Command 'Scripts/bootstrap.sh -d' exited with code 1"."
Here are the logs:
[debug] [XCUITest] The app has been installed successfully.
[debug] [BaseDriver] Event 'appInstalled' logged at 1545635044697 (02:04:04 GMT-0500 (Eastern Standard Time))
[XCUITest] Using WDA path: '/Users/MY_USER_NAME/Documents/CODE/ACTIVE/APPIUM/asialgearoid/mine2/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Using WDA agent: '/Users/MY_USER_NAME/Documents/CODE/ACTIVE/APPIUM/asialgearoid/mine2/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'
[debug] [XCUITest] No obsolete cached processes from previous WDA sessions listening on port 8100 have been found
[debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus'
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Got an unexpected response: {"errno":"ECONNREFUSED","code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":8100}
[debug] [XCUITest] WDA is not listening at 'http://localhost:8100/'
[debug] [XCUITest] WDA is currently not running. There is nothing to cache
[debug] [XCUITest] Trying to start WebDriverAgent 2 times with 10000ms interval
[debug] [BaseDriver] Event 'wdaStartAttempted' logged at 1545635044905 (02:04:04 GMT-0500 (Eastern Standard Time))
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: '/Users/MY_USER_NAME/Documents/CODE/ACTIVE/APPIUM/asialgearoid/mine2/node_modules/.bin/carthage'
[debug] [XCUITest] Running WebDriverAgent bootstrap script to install dependencies
[XCUITest] [1mFetching dependencies
[XCUITest] Error: Command "bootstrap" does not exist.
...
[debug] [BaseDriver] Event 'wdaStartFailed' logged at 1545635057640 (02:04:17 GMT-0500 (Eastern Standard Time))
[debug] [XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: "Command 'Scripts/bootstrap.sh -d' exited with code 1".
Any idea of how to solve?
After further digging I found out how to reproduce the error:
$ cd /myTestingProject/node_modules/appium-xcuitest-driver/WebDriverAgent
$ ./Scripts/bootstrap.sh
Output:
Fetching dependencies
Error: Command "bootstrap" does not exist.
I do not know if this was your problem at the time of writing, but I had this same issue and looked up the latest update documentation. The file bootstrap.sh has been changed to build.sh
This works for me:
cd /usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent
./Scripts/build.sh -d
I tested by wiping my simulator so I could test this with a completely clean slate. I ran the above commands, relaunched the simulator, dropped a .app file onto the simulator, and the WebDriverAgent installed completely fine without any manual work opening Xcode.

client id not not event exception just after zoho salesiq xhr call

I have a React Project and encountered this exception:
client id not not event
Raw:
null: client id not not event
at ? (/teams/5ace3d23fd5dc3053dd04709:0:0)
I am using the zoho salesiq (chat widget) and the exception is triggered just after an xhr call to zoho:
GET https://salesiq.zoho.com/getembeddetails.ls?widgetcode=...
User agent Info:
OS:Mac OS X
Version: 10.13
Browser: Firefox
Version: 59.0
Does someone have any idea of what may be the problem?

Appium: Click within webview context of iOS results to double click

I'm having a problem with a click action within a webview context on iOS. The click works but the single click action is resulting in double click. The way i can tell is that the resulting action execute 2 times, for example: click on a button to show a popup alert, when the click execute the alert shows 2 times.
System:
- Mac/OSX, Appium v1.4.10, iPhone 6 8.1 sim
Appium log snapshot: taken from where it did the click action within web view context
nfo: --> POST /wd/hub/session/6e51e9be-4b04-4557-ada0-e2c4a57dcf7c/element {"using":"xpath","value":"//i[contains(#class,'icon-play')]/parent::a"}
info: [debug] Waiting up to 100ms for condition
info: [debug] [REMOTE] Executing 'find_element' atom in default context
info: [debug] [REMOTE] Sending javascript command
info: [debug] [REMOTE] Sending _rpc_forwardSocketData: message to remote debugger
info: [debug] [REMOTE] Receiving data from remote debugger
info: [debug] [REMOTE] Receiving data from remote debugger
info: [debug] [REMOTE] got applicationSentData response
info: [debug] Responding to client with success: {"status":0,"value":{"ELEMENT":"5006"},"sessionId":"6e51e9be-4b04-4557-ada0-e2c4a57dcf7c"}
info: <-- POST /wd/hub/session/6e51e9be-4b04-4557-ada0-e2c4a57dcf7c/element 200 11.588 ms - 90 {"status":0,"value":{"ELEMENT":"5006"},"sessionId":"6e51e9be-4b04-4557-ada0-e2c4a57dcf7c"}
info: --> GET /wd/hub/session/6e51e9be-4b04-4557-ada0-e2c4a57dcf7c/element/5006/displayed {}
info: [debug] [REMOTE] Executing 'is_displayed' atom in default context
info: [debug] [REMOTE] Sending javascript command
info: [debug] [REMOTE] Sending _rpc_forwardSocketData: message to remote debugger
info: [debug] [REMOTE] Receiving data from remote debugger
info: [debug] [REMOTE] got applicationSentData response
info: [debug] Responding to client with success: {"status":0,"value":true,"sessionId":"6e51e9be-4b04-4557-ada0-e2c4a57dcf7c"}
info: <-- GET /wd/hub/session/6e51e9be-4b04-4557-ada0-e2c4a57dcf7c/element/5006/displayed 200 13.478 ms - 76 {"status":0,"value":true,"sessionId":"6e51e9be-4b04-4557-ada0-e2c4a57dcf7c"}
info: --> POST /wd/hub/session/6e51e9be-4b04-4557-ada0-e2c4a57dcf7c/element/5006/click {"id":"5006"}
info: [debug] [REMOTE] Executing 'click' atom in default context
info: [debug] [REMOTE] Sending javascript command
info: [debug] [REMOTE] Sending _rpc_forwardSocketData: message to remote debugger
info: [debug] [REMOTE] Receiving data from remote debugger
info: [debug] [REMOTE] Receiving data from remote debugger
info: [debug] [REMOTE] got applicationSentData response
info: [debug] [REMOTE] Got a blank data response from debugger
info: [debug] [REMOTE] Receiving data from remote debugger
info: [debug] [REMOTE] Receiving data from remote debugger
info: [debug] [REMOTE] got applicationSentData response
info: [debug] Responding to client with success: {"status":0,"value":null,"sessionId":"6e51e9be-4b04-4557-ada0-e2c4a57dcf7c"}
info: <-- POST /wd/hub/session/6e51e9be-4b04-4557-ada0-e2c4a57dcf7c/element/5006/click 200 62.000 ms - 76 {"status":0,"value":null,"sessionId":"6e51e9be-4b04-4557-ada0-e2c4a57dcf7c"}
info: [debug] [REMOTE] Receiving data from remote debugger
info: [debug] [REMOTE] got applicationSentData response
info: [debug] [REMOTE] Got a blank data response from debugger
info: --> GET /wd/hub/session/6e51e9be-4b04-4557-ada0-e2c4a57dcf7c/context {}
info: [debug] Responding to client with success: {"status":0,"value":"WEBVIEW_17","sessionId":"6e51e9be-4b04-4557-ada0-e2c4a57dcf7c"}
info: <-- GET /wd/hub/session/6e51e9be-4b04-4557-ada0-e2c4a57dcf7c/context 200 0.654 ms - 84 {"status":0,"value":"WEBVIEW_17","sessionId":"6e51e9be-4b04-4557-ada0-e2c4a57dcf7c"}
info: --> POST /wd/hub/session/6e51e9be-4b04-4557-ada0-e2c4a57dcf7c/context {"name":"NATIVE_APP"}
info: [debug] Attempting to set context to 'NATIVE_APP'
info: [debug] Responding to client with success: {"status":0,"value":"","sessionId":"6e51e9be-4b04-4557-ada0-e2c4a57dcf7c"}
info: <-- POST /wd/hub/session/6e51e9be-4b04-4557-ada0-e2c4a57dcf7c/context 200 1.138 ms - 74 {"status":0,"value":"","sessionId":"6e51e9be-4b04-4557-ada0-e2c4a57dcf7c"}
info: --> GET /wd/hub/session/6e51e9be-4b04-4557-ada0-e2c4a57dcf7c/context {}
info: [debug] Responding to client with success: {"status":0,"value":"NATIVE_APP","sessionId":"6e51e9be-4b04-4557-ada0-e2c4a57dcf7c"}
info: <-- GET /wd/hub/session/6e51e9be-4b04-4557-ada0-e2c4a57dcf7c/context 200 0.640 ms - 84 {"status":0,"value":"NATIVE_APP","sessionId":"6e51e9be-4b04-4557-ada0-e2c4a57dcf7c"}
info: --> POST /wd/hub/session/6e51e9be-4b04-4557-ada0-e2c4a57dcf7c/elements {"using":"name","value":"Video Ad Player"}
info: [debug] Waiting up to 100ms for condition
info: [debug] Pushing command to appium work queue: "au.getElementsByName('Video Ad Player')"
info: [debug] Sending command to instruments: au.getElementsByName('Video Ad Player')
info: [debug] [INST] 2015-09-05 01:14:07 +0000 Debug: Got new command 220 from instruments: au.getElementsByName('Video Ad Player')
info: [debug] Socket data received (25 bytes)
info: [debug] Socket data being routed.
i

angularjs xdomain socket timeout

I am running an Angular app on my local machine which connects to a local API via CORS. The app runs on localhost:8000, and the API runs on localhost:7999.
In the past I have counted on xdomain to handle my IE9 compatibility, but this time I'm not having any luck with it. Here's the console log from IE9...
LOG: xdomain (localhost:8000): adding slave: 'localhost:7999'
LOG: xdomain (localhost:8000): proxying request to slave: 'localhost:7999'
LOG: xdomain (localhost:8000): creating iframe xdomain-8f12dd3f
LOG: xdomain (localhost:8000): new socket: xdomain-20f6dbf3
xdomain (localhost:8000): Timeout waiting on iframe socket
Has any one else encountered this problem?
I had a very similar problem.
It turned out my proxy.html (needed for xdomain) was being sent with a 'X-Frame-Options' header, which was preventing the page working in an iFrame which is what xdomain uses.
Removing the 'X-Frame-Options' header from proxy.html on your server or web framework should be able to solve your problem. Make sure you're only removing it for proxy.html though.

Deploying a gradle script from Jenkins using the artifactory plugin

I'm trying to deploy a build from jenkins using the artifactory invocation of gradle plugin and get a an HTTP error 302, going through the log looks like there's a checksum problem that cannot be skipped:
13:35:41.463 [DEBUG] [org.jfrog.gradle.plugin.artifactory.task.BuildInfoBaseTask] Failed checksum deploy of checksum '8d80bb7f1bf2f0457baa3ad7379348c5ecbf2535' with statusCode: 302
13:35:41.466 [DEBUG] [org.apache.http.impl.conn.SingleClientConnManager] Get connection for route HttpRoute[{}->http://artifactory.edegem.eu.thmulti.com]
....
13:35:41.470 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnectionOperator] Connecting
13:35:41.503 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnection] Receiving response: HTTP/1.1 302 Found
Any clue?
Thanks a lot.
302 is a status code for redirects, which means that your Artifactory is not located at 'http://artifactory.edegem.eu.thmulti.com' but in some other location. Browser follows the redirect to the new place (that's the reason you can browse Artifactory under this URL), but Artifactory networking is not. Please verify the 'real' location of Artifactory and point your Jenkins plugin to it.

Resources