下面是我的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
这意味着您使用的Appium服务器版本不支持
POST /wd/hub/session/:session_id/appium/device/set_clipboard
的API调用
来自您正在使用的 appium-java-client。
备注:
selenium-java
版本,Appium 会自行处理。导入时可能会出现不兼容的问题。appium/device/set_clipboard
可能会受到影响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