appium-android

Run an instrument test from within app and wait for result

三世轮回 提交于 2021-02-07 11:15:43
问题 I am developing a QA automation solution that can record/playback QA tests on Android. A key business requirement is to have no dependency on a connected PC while playing back the recorded test. To that end, I'm trying to run an Instrumentation test without a connected PC. (Specifically, an Appium UiAutomator2 test). My current approach is trying to run the test programmatically from my app. If I were running the test normally from a connected PC, I would use the command adb shell am

Search keyboard Appium Java not function

我怕爱的太早我们不能终老 提交于 2021-01-28 08:25:49
问题 try to find a solution for this topic and none of the answers all the websites won't help me, Search keyboard Appium Java not function example not helping codes: ((AndroidDriver) driver).pressKey(new KeyEvent(AndroidKey.ENTER)); same with: driver.sendKeyEvent(AndroidKeyCode.ENTER); or: ((AndroidDriver)driver).pressKeyCode(66) or: ((AndroidDriver)driver).pressKeyCode(84) I'm using this appium version: <dependency> <groupId>io.appium</groupId> <artifactId>java-client</artifactId> <version>6.1.0

relaxed Security AppiumService

半城伤御伤魂 提交于 2020-12-11 02:39:29
问题 I am new to Appium, and I want to execute some ADB commands using appium with C#, example to execute "adb shell ps" Dictionary<string, object> map = new Dictionary<string, object>(); map.Add("command", "ps"); var output = driverAndroid.ExecuteScript("mobile: shell", map); And I start appium programatically AppiumLocalService service; AppiumServiceBuilder builder; if (service == null) { builder = new AppiumServiceBuilder().WithLogFile(new System.IO.FileInfo("Log")); service = builder.Build();

relaxed Security AppiumService

五迷三道 提交于 2020-12-11 02:39:25
问题 I am new to Appium, and I want to execute some ADB commands using appium with C#, example to execute "adb shell ps" Dictionary<string, object> map = new Dictionary<string, object>(); map.Add("command", "ps"); var output = driverAndroid.ExecuteScript("mobile: shell", map); And I start appium programatically AppiumLocalService service; AppiumServiceBuilder builder; if (service == null) { builder = new AppiumServiceBuilder().WithLogFile(new System.IO.FileInfo("Log")); service = builder.Build();

How to start appium server programmatically in Python

安稳与你 提交于 2020-12-07 05:11:10
问题 I want to write a android test framework using Appium and python. Appium link: http://appium.io/ So after installing appium with npm, to start its server I need to execute the command "appium" in terminal.It will start the server. It looks something like this after starting: ranits-MacBook-Pro:$ appium [Appium] Welcome to Appium v1.8.1 [Appium] Appium REST http interface listener started on 0.0.0.0:4723 But I need to start the appium server from my code using python? Any help? 回答1: First of

Permission denied while trying to install opencv4nodejs in Ubuntu

跟風遠走 提交于 2020-11-29 23:54:41
问题 I was trying to install opencv4nodejs in Ubuntu-20.04 using the following command and my node version is v12.19.0 sudo npm i -g opencv4nodejs But getting those errors info install installing opencv version 3.4.6 into directory: /usr/lib/node_modules/opencv4nodejs/node_modules/opencv-build/opencv ERR! Error: Command failed: mkdir -p opencv mkdir: cannot create directory ‘opencv’: Permission denied npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! opencv-build@0.1.9 install: `node ./install.js

Permission denied while trying to install opencv4nodejs in Ubuntu

梦想与她 提交于 2020-11-29 23:54:21
问题 I was trying to install opencv4nodejs in Ubuntu-20.04 using the following command and my node version is v12.19.0 sudo npm i -g opencv4nodejs But getting those errors info install installing opencv version 3.4.6 into directory: /usr/lib/node_modules/opencv4nodejs/node_modules/opencv-build/opencv ERR! Error: Command failed: mkdir -p opencv mkdir: cannot create directory ‘opencv’: Permission denied npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! opencv-build@0.1.9 install: `node ./install.js

How to locate/Access snackbar elements? I am not able to find locators for snackbar

混江龙づ霸主 提交于 2020-06-01 05:33:10
问题 Android Automation using Appium: I am trying to verify/validate the snackbar. but Appium Inspector is not identifying the locators for snackbar. please help me how to validate the snackbar content. 回答1: The easiest way to handle it is to check the source code of your Android application . Assuming you have a text view and button in Snackbar, you should be able to find smth like this: <view class="android.support.design.internal.SnackbarContentLayout" > <TextView android:id="@+id/snackbar_text

Set value of ion-range slider to specific value

本小妞迷上赌 提交于 2020-06-01 05:07:50
问题 I am writing scripts in robot-framework with appium-library. I have range slider on my page and I need to slide it to some specific value. I tried swipe and it was working but I want to swipe slider to specific value. for e.g. lets say My current range value is 10 and I want to slide it upto 11. How can I calculate my end_x and end_y in this case. I also tried Execute Script where I was setting value to DOM element directly. But when I am running script its giving me error "WebDriverException

How to reach the end of a scroll bar in appium?

那年仲夏 提交于 2020-04-28 20:41:47
问题 I'm trying to automate scrolling of a horizontal bar,where the elements of the bar are dynamic and are getting fetched from an API. Is there a way to automate it in appium? 回答1: If you have any element or text in the bottom of page then you can use UiAutomator2. add in desired capability 'UiAutomator2' if you are using appium. capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, "UiAutomator2"); Now use below functions if you have element's id public void scrollByID(String Id, int