appium`HasClipboard()`的“方法尚未实现”异常

问题描述 投票:0回答:2

下面是我的Java代码

String text = "54321";
((HasClipboard) BaseClass.driver).setClipboardText(text);
TouchAction t=new TouchAction(BaseClass.driver);`

上述代码出现异常。

配置:Selenium-java 3.13.0、Java-client 6.1.0、android-test 2.1.1

java appium-android
2个回答
0
投票

这意味着您使用的Appium服务器版本不支持

POST /wd/hub/session/:session_id/appium/device/set_clipboard
的API调用 来自您正在使用的 appium-java-client。

备注:

  1. 不要显式设置
    selenium-java
    版本,Appium 会自行处理。导入时可能会出现不兼容的问题。
  2. 尝试安装最新的appium服务器,并将客户端库更新到7.0.0。有很多正在进行的变化,所以
    appium/device/set_clipboard
    可能会受到影响

0
投票
start_state = problem.getStartState()
    fringe = util.Stack()
    visited = set()

    # Each item in the fringe is a tuple containing the state and a list of actions
    fringe.push((start_state, []))

    while not fringe.isEmpty():
        current_state, actions = fringe.pop()
        if problem.isGoalState(current_state):
            return actions
        visited.add(current_state)
        successors = problem.getSuccessors(current_state)
        for next_state, action, _ in successors:
                   if next_state not in visited:
                    next_actions = actions + [action]
                    fringe.push((next_state, next_actions))
    return []
USE THIS IT WORKS FOR ME FOR DEPTHFIRSTSEARCH IF ANYBODY WANTS TO DO SAME CODE FOR BREATHFIRSTSEARCH YOU JUST HAVE TO REPLACE STACK WITH QUEUES HAVING THE SAME CODE 
I HOPE THIS WILL HELP YOU 
© www.soinside.com 2019 - 2024. All rights reserved.