0
複数の引用符では変数の展開が行われません。appium find要素を使用した複数引用符でのPython変数の展開
el = self.driver.find_element_by_android_uiautomator('new UiSelector().text("One")')
エラーメッセージ:ここにコード
products = ['One','Two','Three']
for i in range(0,len(products)):
el = self.driver.find_element_by_android_uiautomator('new UiSelector().text("{}")').format(products[i])
print (el)
期待される結果があるべきである
File "temp_test.py", line 84, in test_product
el = self.driver.find_element_by_android_uiautomator('new UiSelector().text("{}")').format(products[i])
NoSuchElementException: Message: An element could not be located on the page using the given search parameters.
私はこの問題を解決するために助けてください!