问题标签 [selendroid]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
1840 浏览

java - 如何在 selendroid 中验证 toast 消息

我需要验证诸如“创建成功”之类的 toast 消息。我尝试使用链接文本。但它不起作用。有人可以帮我解决这个问题吗?

0 投票
1 回答
691 浏览

javascript - Selenium / Browserstack 中的移动手势与 Node

我正在使用 Mocha 通过 Browserstack 对移动网站运行基于 javascript 的 Selenium 测试。我的测试适用于琐碎的情况(找到这个元素,点击它,然后期望找到一个带有这个文本的元素)。

但是,我现在遇到了需要模拟手势(从右到左轻弹)的情况。我在 Selenium Java API ( http://selenium.googlecode.com/git/docs/api/java/org/openqa/selenium/interactions/touch/TouchActions.html ) 中找到了 TouchActions 类的文档,但我在 Javascript 实现中没有找到任何匹配的类或方法。

失败了,我尝试通过单击并拖动屏幕右侧的元素来手动传递相同的手势:

不幸的是,这让我:

UnknownCommandError:selendroid 目前还不支持请求的命令。

有没有人有任何其他建议通过 Selenium 在 Node/js 中传递这个手势?

0 投票
1 回答
308 浏览

android - 如何使用 Selendroid 获取在 android 设备中运行的进程列表

任何人都可以帮助我使用 Selendroid 获取 Android 中正在运行的进程列表吗?

0 投票
3 回答
1282 浏览

c# - Appium:在 Android 屏幕上查找元素的正确方法

我想使用Appium为我的 Android 应用程序进行自动化测试。我正在用 C# 编写测试。我在搜索中做了相当多的分享,但找不到很好的文档来解释如何访问 Android 屏幕上的元素。我知道有像FindElementsByXPath,等这样的方法FindElementByIdFindElementByName但是当我遇到异常时,我无法正确使用这些方法。请阅读以下问题:

1)要使用FindElementsByXPath方法,我需要PageSource提前知道哪些只能使用driver.PageSource. 在运行测试之前有什么方便的方法可以知道PageSource,以便我可以将 XPath 字符串作为参数传递给FindElementsByXPath

2)我EditTextView在Android屏幕上。在布局中声明如下:

在编写测试时如何EditTextView使用它的 id 即“密码”访问它?

3)是否可以以EditTextView编程方式将文本设置为?如果是,该怎么做?

感谢您花时间阅读整个问题。如果您有任何资源来解释如何在编写Appium测试时访问和操作 Android 屏幕上的元素,请提供给我。

0 投票
0 回答
143 浏览

selendroid - 更改 selendroid 服务器默认端口后如何从服务器获得响应?

我是 Selendroid 的新手,我一直在尝试按照标准说明测试应用程序。

默认端口为 4444 时,测试失败,表明服务器响应失败。当我检查连接状态时,4444 端口有“时间等待”,8080 端口有“建立”作为相应的状态。因此,我将 selendroid 服务器端口更改为 8080 以查看是否可以解决问题。现在,当我运行测试时,没有执行任何命令。请给我一个解决方案。

谢谢你。

0 投票
0 回答
540 浏览

android - Appium in Selendroid mode ( Android SDK API < 17 ) activity never started error

I am trying to run my Appium test for Android 2.4 device in Selendroid mode, I defined starter activity, everything is fine but it is giving me Activity never started error.

These are my capabilities:

I checked couple posts from Google Groups, they were recommending to add appWaitActivity and appWaitPackage to capabilities. I tried it but it didn't change the result.

This is the error I am getting:

EDIT

I tracked down the issue and found out that Appium is using dumpsys window to get current activity. I ran this command in command line and on a Android 2.3 device it returned nothing for mCurrentFocus. It returns current activity in other versions but it is empty for 2.3.

Any idea?

0 投票
1 回答
4930 浏览

android - 如何更改 Genymotion 端口

我想同时在不同的 Genymotion 设备上运行自动化测试。为此,我必须为每个设备提供单独的端口号。

可能吗?

0 投票
1 回答
1041 浏览

selenium - 使用 Appium 从 Mac 运行测试时无法在 webview 中执行触摸操作

我被以下问题严重困扰,请帮助我解决问题。


对于我得到的所有触摸动作

org.openqa.selenium.WebDriverException:未实现的命令:session/537d48a9dcdfb38a12ff318a302c9a08/touch/scroll 命令持续时间或超时:8 毫秒 构建信息:版本:'2.42.2',修订:'6a6995d31c7c56c340d6f45a76976d43506-06-06',时间:20-06- 10:52:47' 系统信息:主机:'Praveen-Prabhus-MacBook-Pro.local',ip:'192.168.0.42',os.name:'Mac OS X',os.arch:'x86_64',os .version: '10.9.4', java.version: '1.7.0_65' 会话 ID: bbe122fa-f325-4142-a555-9d2f4ea60e02 驱动程序信息: core.AppiumSwipeableDriver


我也尝试过 AppiumDriver - TouchAction,这给了我

org.openqa.selenium.UnsupportedCommandException:未知命令:session/9e5f0b55fdfb2c98dd019f44a7bf9c8a/touch/perform

我已经在 Windows 机器上成功运行了上面显示的相同脚本,但是现在我已经将我的项目移动到 MAC 并且在它没有按预期运行之后。

请帮我解决这个问题

0 投票
1 回答
2915 浏览

java - 从java停止adb screenrecord

我正在使用 Selendroid 来测试我的应用程序。在每个测试开始时,我使用以下函数运行 adb shell screenrecord:

录制开始,一切正常。在每次测试结束时,我尝试通过以下代码停止记录:

在测试中我使用以下结构:

问题是视频录制不会停止。如何在每次测试结束时停止通话录音?

0 投票
0 回答
423 浏览

java - Android 模拟器详细信息未在 Selenium Server for Selendroid 中列出

我正在尝试使用 selenium 在 android 中进行移动自动化测试的示例项目。
从链接http://selendroid.io/mobileWeb.html,我启动了 selenium 独立服务器并启动了 android 模拟器。但仿真器设备未列在 selenium 服务器支持的设备中。在 selenium 服务器中检查模拟器详细信息时
http://localhost:4444/wd/hub/status

即使添加了从链接http://www.abodeqa.com/2013/05/08/configuring-android-webdriver-in-eclipse/指定的模拟器,受支持的设备仍列为空。

如何将 android 模拟器附加并列出到 selenium 服务器。
任何建议都会很有帮助。