Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/assembly/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何解决超时异常?_Python_Selenium - Fatal编程技术网

Python 如何解决超时异常?

Python 如何解决超时异常?,python,selenium,Python,Selenium,我有以下代码用于在iframe沙箱下填充cvv输入 WebDriverWait(browser, 10).until(EC.frame_to_be_available_and_switch_to_it((By.XPATH,"/html/body/div[1]/div/div[3]/div/div[2]/div/div/main/section[3]/div/div[1]/div[2]/div[4]/div/div/div/div/div[2]/div[1]/div/div[3]/div

我有以下代码用于在iframe沙箱下填充cvv输入

WebDriverWait(browser, 10).until(EC.frame_to_be_available_and_switch_to_it((By.XPATH,"/html/body/div[1]/div/div[3]/div/div[2]/div/div/main/section[3]/div/div[1]/div[2]/div[4]/div/div/div/div/div[2]/div[1]/div/div[3]/div/iframe")))
WebDriverWait(browser, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/form/div/input"))).send_keys("42342342") 
iframe的代码如下所示

<iframe sandbox="allow-scripts allow-same-origin" class="credit-card-iframe-cvv mt1 u-full-width" src="https://paymentcc.nike.com/services/cvv?id=f2c34789-05ee-4d38-a4cb-5e51dfbe9d6e&amp;ctx=checkout&amp;language=undefined&amp;maskerEnabled=true" frameborder="0" scrolling="no" title="Credit Card CVV Form"></iframe>

为什么???

这回答了你的问题吗?
File "/home/teflon/.local/lib/python2.7/site-packages/selenium/webdriver/support/wait.py", line 80, in until
    raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message: