Skip to content

Instantly share code, notes, and snippets.

View khanhdodang's full-sized avatar

Khanh Do khanhdodang

  • Ho Chi Minh, Viet Nam
View GitHub Profile
@khanhdodang
khanhdodang / mousemove.ps1
Created May 4, 2022 08:36 — forked from MatthewSteeples/mousemove.ps1
Powershell Script to keep the mouse moving
Add-Type -AssemblyName System.Windows.Forms
while ($true)
{
$Pos = [System.Windows.Forms.Cursor]::Position
$x = ($pos.X % 500) + 1
$y = ($pos.Y % 500) + 1
[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($x, $y)
Start-Sleep -Seconds 10
}
@khanhdodang
khanhdodang / AdbCommands
Created April 26, 2020 10:35 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@khanhdodang
khanhdodang / upload app into Kobiton AppsRepo.sh
Created August 21, 2019 20:58
replace username, apikey, and filename
#!/bin/bash
# set -ex
# # Install ack
# curl https://beyondgrep.com/ack-2.22-single-file > /usr/local/bin/ack && chmod 0755 /usr/local/bin/ack
USERNAME='khanhdo'
APIKEY='b4e1a551-a8f3-4cd6-9534-67f62bace044'
FILENAME="/Users/khanhdo/Downloads/ApiDemos-debug.apk"
APPID='38094'
#!/bin/bash
user=$(whoami)
echo "$user@$(ipconfig getifaddr en0)"
DownloadOrganization() {
file="https://kobiton-devvn.s3-ap-southeast-1.amazonaws.com/downloads/Apple_Configurator2_Organization.zip"
if [ ! -f "/Users/"$user"/Library/Application Support/Kobiton/Organization.crt" ]; then
curl -I $file
curl $file -o "/Users/"$user"/Library/Application Support/Kobiton/Organization.zip"
#!/bin/bash
user=$(whoami)
echo "$user@$(ipconfig getifaddr en0)"
Devices () {
idevice_id -l | awk '{print $1}'
echo
}
for device in $(Devices); do
From Client Response:
{
"value": {
"message": "An unknown server-side error occurred while processing the command. Original error: -[NSTaggedPointerString fb_lastSnapshot]: unrecognized selector sent to instance 0xa000000303030354\n\n(\n\t0 CoreFoundation 0x000000018e4711d0 <redacted> + 148\n\t1 libobjc.A.dylib 0x000000018cea855c objc_exception_throw + 56\n\t2 CoreFoundation 0x000000018e478268 <redacted> + 0\n\t3 CoreFoundation 0x000000018e475270 <redacted> + 916\n\t4 CoreFoundation 0x000000018e36e80c _CF_forwarding_prep_0 + 92\n\t5 WebDriverAgentLib 0x0000000101d5abc4 -[FBBaseGestureItem hitpointWithElement:positionOffset:error:] + 100\n\t6 WebDriverAgentLib 0x0000000101d456a8 -[FBAppiumGestureItem coordinatesWithOptions:error:] + 868\n\t7 WebDriverAgentLib 0x0000000101d45044 -[FBAppiumGestureItem initWithActionItem:application:atP
[debug] [iOS] Response url for executeAsync: http://10.151.0.25:10202/wd/hub/session/8d542b03-54c0-4ff9-bf40-306a6f08373e/receive_async_response
[debug] [RemoteDebugger] Executing 'execute_async_script' atom in default context
[debug] [RemoteDebugger] Garbage collecting with 5000ms timeout
[debug] [RemoteDebugger] Unable to collect garbage at this time
[debug] [RemoteDebugger] Sending javascript command (function(){return function(){var e=this;
[debug] [RemoteDebugger] funct...
[debug] [RemoteDebugger] Sending WebKit data: {"method":"Runtime.evaluate","params":{"objectGroup":"console","includeCommandLineAPI":true,"doNotPauseOnExceptionsAndMuteConsole":true,"expression":"(function(){return function(){var e=this;\nfunc...
[debug] [RemoteDebugger] Webkit response timeout: 5000
[debug] [RemoteDebugger] Received WebKit data: '{"result":{"result":{"type":"undefined"},"wasThrown":false},"id":5}'
[debug] [RemoteDebugger] Found method 'Runtime.evaluate' for '5' message
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"deviceName":"*","nativeWebTap":true,"newCommandTimeout":200,"autoGrantPermissions":true,"browserName":"safari","deviceOrientation":"portrait","platformName":"iOS","showSafariNetworkLog":true,""noReset":true,"fullReset":false,"orientation":"PORTRAIT","automationName":"XCUITest"}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"deviceName":"*","nativeWebTap":true,"newCommandTimeout":200,"autoGrantPermissions":true,"browserName":"safari","captureScreenshots":true,"deviceOrientation":"portrait","platformName":"iOS","showSafariNetworkLog":true, "noReset":true,"fullReset":false,"orientation":"PORTRAIT","automationName":"XCUITest"},null,null]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1545798752064 (11:32:32 GMT+0700 (+07))
[Appium] Creating new XCUITestDriver (v2.94.2) session
[Appium] Capabilities:
[Appium]
import 'babel-polyfill'
import 'colors'
import wd from 'wd'
import {assert} from 'chai'
const username = 'your Kobiton username'
const apiKey = 'your Kobiton api key'
const kobitonServerConfig = {
protocol: 'https',
The error log from terminal as below:
1) auth form should deny access with wrong creds:
selector needs to be typeof `string`
running firefox
ProtocolError: selector needs to be typeof `string`
at Page.Object.create.submit.value (portal/pageobjects/form.page.js:20:20)
at Context.<anonymous> (portal/specs/form.spec.js:9:18)
at screenshot() - saveScreenshot.js:16:17
at saveScreenshot("errorShots/ERROR_firefox_2016-08-01T13-33-07.446Z.png") - safeExecute.js:28:24