我最近发现我的Sirikit应用程序无法添加新任务。每当我尝试通过用from selenium.webdriver.common.keys import Keys
from time import sleep, strftime
from random import randint
import pandas as pd
chromedriver_path = 'C:/Users/Enrico/Downloads/chromedriver_win32/chromedriver.exe'
webdriver = webdriver.Chrome(executable_path=chromedriver_path)
sleep(2)
webdriver.get('https://www.instagram.com/accounts/login/?source=auth_switcher')
sleep(3)
username = webdriver.find_element_by_name('username')
username.send_keys('username')
password = webdriver.find_element_by_name('password')
password.send_keys('password')
password.send_keys(Keys.ENTER)
sleep(3)
notnow = webdriver.find_elements_by_css_selector('body > div:nth-child(13) > div > div > div > div.mt3GC > button.aOOlW.HoLwm')
notnow.click()
来完成标题或列表解析的操作来确认用户的给定信息时,Siri总是使Siri回复“对不起,该应用程序有问题”,“嗯,出了点问题。请重试。” 。
我很好奇,是否有人知道您在最近的iOS 13.1.x中有规格更改或任何类似的问题?
示例代码在这里:
INSpeakableStringResolutionResult.confirmationRequired
如果我们使用其他参数代替import Intents
class IntentHandler: INExtension, INSendMessageIntentHandling, INAddTasksIntentHandling, INSearchForMessagesIntentHandling, INSetMessageAttributeIntentHandling {
func handle(intent: INAddTasksIntent, completion: @escaping (INAddTasksIntentResponse) -> Void) {
let userActivity = NSUserActivity(activityType: NSStringFromClass(INAddTasksIntent.self))
let response = INAddTasksIntentResponse(code: .success, userActivity: userActivity)
completion(response)
}
func resolveTargetTaskList(for intent: INAddTasksIntent, with completion: @escaping (INAddTasksTargetTaskListResolutionResult) -> Void) {
completion(INAddTasksTargetTaskListResolutionResult.notRequired())
//completion([INSpeakableStringResolutionResult.confirmationRequired(with: INSpeakableString(spokenPhrase: "test1"))])
}
func resolveTaskTitles(for intent: INAddTasksIntent, with completion: @escaping ([INSpeakableStringResolutionResult]) -> Void) {
completion([INSpeakableStringResolutionResult.notRequired()])
//completion([INSpeakableStringResolutionResult.confirmationRequired(with: INSpeakableString(spokenPhrase: "test2"))])
}
override func handler(for intent: INIntent) -> Any {
return self
}
}
。它会按预期工作。我也为confirmationRequired
和锻炼目的尝试了相同的参数,但是它们都可以工作。这很奇怪,因为它仅在INTaskIntent失败。
非常感谢:)