Starting Node Server
info: Welcome to Appium v1.2.0 (REV e53f49c706a25242e66d36685c268b599cc18da5)
debug: Non-default server args: {"address":"127.0.0.1","logNoColors":true,"platformName":"Android","platformVersion":"19","automationName":"Appium"}
info: Appium REST http interface listener started on 127.0.0.1:4723
info: LogLevel: debug
info: --> POST /wd/hub/session {"desiredCapabilities":{"automationName":"Appium","platform":"Android","platformVersion":"19","app":"C:\\Users\\qadeer\\Documents\\NetBeansProjects\\convoTest\\app\\Convo.apk","platformName":"Android","deviceName":"01899dd5c94c237a","browserName":"","app-package":"com.convo.android","app-activity":".ConvoMain","version":"4.4.2"}}
debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"desiredCapabilities":{"automationName":"Appium","platform":"Android","platformVersion":"19","app":"C:\\Users\\qadeer\\Documents\\NetBeansProjects\\convoTest\\app\\Convo.apk","platformName":"Android","deviceName":"01899dd5c94c237a","browserName":"","app-package":"com.convo.android","app-activity":".ConvoMain","version":"4.4.2"}}
info: Starting android appium
debug: The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : platform, app-package, app-activity, version
debug: No …
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用Appium(npm版本)为Android应用程序设置自动化测试,但我一直收到错误
[UiAutomator2] Did not get confirmation UiAutomator2 deleteSession worked; Error was: UnknownError: An unknown server-side error occurred while processing the command. Original error: Trying to proxy a session command without session id
[UiAutomator2] Unable to remove port forward 'Error executing adbExec. Original error: 'Command '/usr/local/android-sdk/platform-tools/adb -P 5037 -s emulator-5554 forward --remove tcp\:8200' exited with code 1'; Stderr: 'error: listener 'tcp:8200' not found'; Code: '1''
我已经浏览了谷歌多年,但是能够找到任何实际上对我有用的解决方案,到目前为止共有50个失败的版本.
如果我在我的本地机器上运行命令它工作正常但在travis内我很遗憾没有这样的运气.我是设置appium的新手,所以它可能是一些不太理解的东西.
分配:
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty
提前致谢.
我们正在评估 App 测试工具,Appium 是我们的候选者,但是我找不到一个很好的解决方案,如何在使用 Appium 时模拟后端?
考虑: - 我想要一个将在 iOS 和 Android 应用程序上执行的 UI 测试(Appium 应该是多平台的)
测试场景:
问题:
如何模拟 API 调用?
Appium 使用构建的项目(例如 apk)。在从 Appium 端构建之前,有什么方法可以集成和配置应用程序吗?例如,如果 Appium 触发构建,则应用程序应使用虚假 API 响应 (JSON)。
我正在使用 Selenium 和 Java 在 android 上运行脚本(通过 Appium 服务器)。我看到使用 selenium 来定位吐司是不可能的
driver.findElement(By.LinkText("User not logged in")
Run Code Online (Sandbox Code Playgroud)
在 Appium
但是可以在 Selendroid 中用于捕获 toast 消息。
有没有办法在同一个脚本中同时使用 Selendroid 和 Appium?
我正在通过 appium Inspector 录制示例脚本,并且在运行时出现这样的错误。我的脚本是python语言。
File "second.py", line 14, in <module>
wd = webdriver.Remote('http://0.0.0.0:4723/wd/hub', desired_caps) NameError: name 'webdriver' is not defined
Run Code Online (Sandbox Code Playgroud)
下面是我的脚本。
import os
from selenium.webdriver.firefox.webdriver import WebDriver
from selenium.webdriver.common.action_chains import ActionChains
import time
success = True
desired_caps = {}
desired_caps['appium-version'] = '1.0'
desired_caps['platformName'] = 'iOS'
desired_caps['platformVersion'] = '8.2'
desired_caps['deviceName'] = 'iPhone 6'
desired_caps['app'] = os.path.abspath('/Users/admin/Library/Developer/Xcode/DerivedData/MyApp-podyodvceucybuaaiiuoprthidqh/Build/Products/Debug-iphonesimulator/MyApp.app')
wd = webdriver.Remote('http://0.0.0.0:4723/wd/hub', desired_caps)
wd.implicitly_wait(60)
def is_alert_present(wd):
try:
wd.switch_to_alert().text
return True
except:
return False
try:
wd.find_element_by_name("Accept").click()
wd.find_element_by_name("Sign In").click()
finally:
wd.quit()
if not success:
raise Exception("Test …
Run Code Online (Sandbox Code Playgroud) 我收到此错误代码,但找不到任何解决方案:
Exception in thread "main" org.openqa.selenium.NoSuchSessionException: A session is either terminated or not started
Run Code Online (Sandbox Code Playgroud)
我尝试在互联网上查找一些信息,但没有找到符合我问题的信息。
我尝试使用 appium 和一些硬编码变量来自动化游戏《第七史诗》的一小部分。我不知道我的能力是否有任何问题,但我认为没有,因为它在 Inspektor Session 中工作得很好。所以我想一定是我的代码、逻辑或者驱动安装有问题。
我的代码:
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Scanner;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.DesiredCapabilities;
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.MobileElement;
import io.appium.java_client.TouchAction;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.touch.offset.PointOption;
public class main {
public static DesiredCapabilities init() {
// "platformName": "Android",
// "deviceName": "HUAWEI P10",
// "appPackage": "com.stove.epic7.google",
// "appActivity": "kr.supercreative.epic7.AppActivity",
// "noReset": true,
// "skipDeviceInitialization": true,
// "skipServerInstallation": true
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("deviceName", "HUAWEI …
Run Code Online (Sandbox Code Playgroud) 我需要更新 .mp4 文件的创建时间,以便它出现在按创建日期排序的媒体文件列表的顶部。我可以使用 os.utime 轻松更新文件的访问日期和修改日期,但尚未找到将文件的创建日期更改为“现在”的好方法。
我的最终目标是使用 appium 将媒体文件种子到 iOS 模拟器,并在该脚本中访问这些媒体文件。问题是视频文件不会显示在应用程序的“最近添加”部分,因为它已经有几天了。
无论我如何尝试,我都无法让我的 React Native (Android) 应用程序使用 Appium 向下滚动。
我正在使用 UiAutomator2 和 WebdriverIO。
我的代码如下所示:
scrollUntilDisplayed(element: WebdriverIO.Element) {
const dimensions = driver.getWindowSize();
touchScroll(10, 100);
}
Run Code Online (Sandbox Code Playgroud)
touchScroll
我尝试了以下调用来代替:
driver.touchScroll(offsetX, offsetY)
- 抛出错误 ( invalid argument: java.lang.IllegalArgumentException: ScrollToModel: The mandatory field 'params' is not present in JSON
)driver.touchScroll(offsetX, offsetY, element)
- 抛出错误 ( invalid argument: java.lang.IllegalArgumentException: ScrollToModel: The mandatory field 'params' is not present in JSON
)browser.execute("mobile: scroll", {direction: 'down'});
- 抛出错误 ( unknown error: An unknown server-side error occurred while processing the …
javascript appium webdriver-io android-uiautomator react-native
要使用 Appium 自动化 Flutter 应用程序,我们需要设置 Flutter 应用程序中任何元素/控件的资源 ID(对于 Android)和 Accessibility-Id/Content-desc(对于 iOS)。要在flutter应用程序的Appium树视图中获取resource-id和accessibility-Id,应该做什么?请帮助提供可能的解决方案来实现这一目标。
请参阅下面的 Appium 树视图屏幕截图,其中显示了缺少的资源 ID。
颤振版本=1.17.5
请注意,我们已经尝试过使用 Widget 的“key”属性来进行唯一标识,但没有成功。
我正在尝试使用 Appium 通过 Chrome将文件上传到https://the-internet.herokuapp.com/upload。但它总是导致ERR_ACCESS_DENIED
错误。
该文件位于Download
我设备的文件夹中。
参考下图:
我也用不同的组合尝试了以下功能,但没有帮助:noReset, autoGrantPermissions, fastReset
.
我的脚本:
from appium import webdriver
import time
def execute_script():
driver = webdriver.Remote(
command_executor='http://0.0.0.0:4723/wd/hub',
desired_capabilities={
"platform": "android",
"platformName": "android",
"platformVersion": "10",
"deviceName": "<xxxx>",
"udid": "<xxxx>",
"browserName": "chrome",
"automationName": "UIAutomator2",
"chromeOptions": {
"w3c": False
},
# "autoGrantPermissions": True,
# "noReset": True,
# "fastReset": True,
# "fullReset": False
}
)
driver.get('https://the-internet.herokuapp.com/upload')
up = driver.find_element_by_id("file-upload")
up.send_keys("/sdcard/Download/file.pdf")
driver.find_element_by_id("file-submit").click()
driver.quit()
driver = execute_script()
Run Code Online (Sandbox Code Playgroud)
脚本执行良好,直到这send_keys
一步。但是一旦file-submit
执行点击,就会导致上述错误。我也在 …
appium ×10
android ×3
java ×2
python ×2
selenium ×2
adb ×1
appium-ios ×1
flutter ×1
javascript ×1
mocking ×1
node.js ×1
python-2.7 ×1
react-native ×1
selendroid ×1
travis-ci ×1
webdriver-io ×1