Skip to content

Instantly share code, notes, and snippets.

View Dor-bl's full-sized avatar
:atom:
Working in Hybrid mode

Dor Blayzer Dor-bl

:atom:
Working in Hybrid mode
View GitHub Profile
@Dor-bl
Dor-bl / reset.log
Created May 5, 2024 07:57
appium driver run uiautomator2 reset
C:\Windows\system32>appium driver run uiautomator2 reset
info ADB Found 5 'build-tools' folders under 'C:\Users\user\AppData\Local\Android\Sdk' (newest first):
info ADB C:\Users\user\AppData\Local\Android\Sdk\build-tools\35.0.0-rc1
info ADB C:\Users\user\AppData\Local\Android\Sdk\build-tools\34.0.0
info ADB C:\Users\user\AppData\Local\Android\Sdk\build-tools\34.0.0-rc3
info ADB C:\Users\user\AppData\Local\Android\Sdk\build-tools\33.0.2
info ADB C:\Users\user\AppData\Local\Android\Sdk\build-tools\30.0.3
info ADB Using 'adb.exe' from 'C:\Users\user\AppData\Local\Android\Sdk\platform-tools\adb.exe'
dbug ADB Running 'C:\Users\user\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 start-server'
dbug ADB Getting connected devices
@Dor-bl
Dor-bl / logcat logs
Last active March 6, 2024 08:03
python touch W3C actions
--------- beginning of kernel
03-06 10:01:29.894 0 0 D logd : Skipping 4294965973 entries from slow reader, pid 8198, from LogBuffer::kickMe()
--------- beginning of main
03-06 10:01:34.371 8243 8277 I appium : channel read: POST /session/340f95d4-c2e1-4f58-aa0b-1ab833785d59/element
03-06 10:01:34.373 8243 8277 I appium : FindElement command
03-06 10:01:34.377 8243 8277 I appium : method: 'accessibility id', selector: 'Login_LogoImage'
03-06 10:01:34.378 8243 8277 I appium : Idle timeout is not greater than zero. Skipping the wait
03-06 10:01:34.411 8243 8277 I appium : AppiumResponse: {"sessionId":"340f95d4-c2e1-4f58-aa0b-1ab833785d59","value":{"ELEMENT":"00000000-0000-0061-ffff-ffff00000d52","element-6066-11e4-a52e-4f735466cecf":"00000000-0000-0061-ffff-ffff00000d52"}}
03-06 10:01:38.422 8243 8277 I appium : channel read: POST /session/340f95d4-c2e1-4f58-aa0b-1ab833785d59/actions
03-06 10:01:38.423 8243 8277 I appium : W3CActions command
blayzer@ILNESAHPRIACC8D ~ % appium
[Appium] Welcome to Appium v2.4.1
[Appium] The autodetected Appium home path: /Users/blayzer/.appium
[Appium] Attempting to load driver xcuitest...
[Appium] Attempting to load driver uiautomator2...
[Appium] Requiring driver at /Users/blayzer/.appium/node_modules/appium-xcuitest-driver/build/index.js
[Appium] XCUITestDriver has been successfully loaded in 0.556s
[Appium] Requiring driver at /Users/blayzer/.appium/node_modules/appium-uiautomator2-driver/build/index.js
[Appium] AndroidUiautomator2Driver has been successfully loaded in 1.051s
[Appium] Appium REST http interface listener started on http://0.0.0.0:4723
using static OpenQA.Selenium.Interactions.PointerInputDevice;
using PointerInputDevice = OpenQA.Selenium.Appium.Interactions.PointerInputDevice;
var touch = new PointerInputDevice(PointerKind.Touch, "finger");
// Create a sequence for tap
var sequence = new ActionSequence(touch);
PointerEventProperties pointerEventProperties = new PointerEventProperties();
pointerEventProperties.Pressure = 1;
@Dor-bl
Dor-bl / update_feat_branch.md
Last active December 23, 2023 09:29
Update feat branch

Updating a feature branch First we'll update your local main branch. Go to your local project and check out the branch you want to merge into (your local main branch)

$ git checkout main

Fetch the remote, bringing the branches and their commits from the remote repository. You can use the -p, --prune option to delete any remote-tracking references that no longer exist in the remote. Commits to main will be stored in a local branch, remotes/origin/main.

$ git fetch -p origin
using Appium.Net.Integration.Tests.helpers;
using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Appium.Android;
using OpenQA.Selenium.Appium.Service;
namespace Appium.Net.Integration.Tests.Service
{
[TestFixture]
class AppiumCommandExecutorTest
@Dor-bl
Dor-bl / gist:d74f473c4b66f1ba001643b806bb1558
Created August 10, 2023 18:58
GetPerformanceData err
[debug] [AndroidUiautomator2Driver@85fd (26f66b59)] Calling AppiumDriver.getCurrentPackage() with args: ["26f66b59-0915-4ad2-898e-97d981335796"]
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running 'E:\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys window displays'
[debug] [AndroidUiautomator2Driver@85fd (26f66b59)] Responding to client with driver.getCurrentPackage() result: "com.google.android.apps.nexuslauncher"
[HTTP] <-- GET /session/26f66b59-0915-4ad2-898e-97d981335796/appium/device/current_package 200 162 ms - 49
[HTTP]
[debug] [HTTP] Request idempotency key: 74df98ef-20ce-4de8-afb9-c1a4a451744e
[HTTP] --> POST /session/26f66b59-0915-4ad2-898e-97d981335796/appium/getPerformanceData
[HTTP] {"packageName":"com.google.android.apps.nexuslauncher","dataType":"cpuinfo"}
[debug] [AndroidUiautomator2Driver@85fd (26f66b59)] Calling AppiumDriver.getPerformanceData() with args: ["com.google.android.apps.nexuslauncher","cpuinfo",null,null,null,"26f66b59-0915-4ad2-898e
@Dor-bl
Dor-bl / GetPerformanceDataTest.cs
Created August 10, 2023 18:54
GetPerformanceDataTest
public void GetPerformanceDataTest()
{
var androidDriver = _driver as AndroidDriver;
var packageName = androidDriver?.CurrentPackage;
Assert.Multiple(() =>
{
Assert.That(androidDriver?.GetPerformanceData(packageName, PerformanceDataType.CpuInfo), Is.Not.Null.Or.Empty);
Assert.That(androidDriver?.GetPerformanceData(packageName, PerformanceDataType.CpuInfo, 15),
Is.Not.Null.Or.Empty);
android\helper\new_test_helper.py:43: in android_driver_factory
self.android_driver = create_android_driver()
android\helper\new_test_helper.py:19: in create_android_driver
return webdriver.Remote(SERVER_URL,
..\venv\Lib\site-packages\appium\webdriver\webdriver.py:257: in __init__
super().__init__(
..\venv\Lib\site-packages\selenium\webdriver\remote\webdriver.py:206: in __init__
self.start_session(capabilities)
..\venv\Lib\site-packages\appium\webdriver\webdriver.py:346: in start_session
response = self.execute(RemoteCommand.NEW_SESSION, w3c_caps)
[HTTP] --> GET /session/d79343a0-a80b-491a-abf8-51daa2c6a821/location
[HTTP] {}
[debug] [AndroidUiautomator2Driver@3f58 (d79343a0)] Calling AppiumDriver.getGeoLocation() with args: ["d79343a0-a80b-491a-abf8-51daa2c6a821"]
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running 'C:\Users\dorb\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pgrep -f \(\[\[:blank:\]\]\|\^\)io\.appium\.settings\(\[\[:blank:\]\]\|\$\)'
[debug] [ADB] Running 'C:\Users\dorb\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am broadcast -n io.appium.settings/.receivers.LocationInfoReceiver -a io.appium.settings.location'
[debug] [AndroidUiautomator2Driver@3f58 (d79343a0)] Encountered internal error running command: Error: Cannot parse the actual location values from the command output: Broadcasting: Intent { act=io.appium.settings.location flg=0x400000 cmp=io.appium.settings/.receivers.LocationInfoReceiver }
[debug] [AndroidUiautomator2Driver@