selenium - 如何将 WebDriver 的焦点从 Native App 切换到 Web 授权页面
问题描述
无法为标题提出正确的措辞,但将在此处解释:
所以我m testing native iOS app and at some point user need to connect fitBit Account. So When user tap on Connect => He redirected to fitBit auth page which is webview.
While i
一直在 browserStack 中运行测试,这个网页上的所有元素都是可交互的,我没有问题。但是在模拟器上,当这个网页打开时,Appium 日志会检测到新的应用程序
我对切换上下文感到满意,但是当我尝试打印出所有可用上下文的数组时,我只打印了一个(MyApp_NATIVE)
Appium 日志检测到这一点:
[debug] [RemoteDebugger] "WIRTitleKey": "Fitbit",
[debug] [RemoteDebugger] "WIRTypeKey": "WIRTypeWeb",
[debug] [RemoteDebugger] "WIRURLKey": "https://accounts.fitbit.com/login?. ....... blablalblalbla
我可以使用上述值之一来切换驱动程序的焦点吗?
如何使驱动程序识别此网页上的元素。
解决方案
推荐阅读
- android - 如何在 react-native 中计算应用程序上的通知
- laravel - 在源代码中显示 api 令牌有什么问题吗?(Laravel + Vue.js)
- typescript - 类验证器验证联合类型
- reactjs - 如何将分组/嵌套/树数据从材料表导出到 CSV?
- shell - 如何在 shell 脚本中编写用户定义的错误代码
- c++ - Windows 进程句柄数持续增长
- python - 用户没有个人资料。RelatedObjectDoesNotExist
- html - 为什么我在缩放以适应页面 VBA 时会出现空格
- javascript - `Required` 属性不起作用
- amazon-web-services - 组织中的 SCP 限制 EC2 实例的创建,没有强制标签的卷