我不知道为什么会这样。我已经试着修好一段时间了
def Bettings():
while True:
if "Rolling in 35." in Label.text:
Updated_Balance = driver.find_element_by_xpath("""//*[@id="balance"]""")
if "Rolling in 23." in Label.text:
Current_Balance = driver.find_element_by_xpath("""//*[@id="balance"]""")
if "Rolling in 28." in Label.text:
if Current_Balance < Updated_Balance:
GrayBetButton.click()
if Current_Balance > Updated_Balance:
RedBetButton.click()
Bettings()
错误:
^{pr2}$
只有在通过
"Rolling in 23." in Label.text
'路径'时,才定义变量Current_Balance
。在当您直接通过
"Rolling in 28." in Label.text
路径时,尚未创建此变量。在您可能需要在顶部创建此变量,如下所示:
注意,按照惯例,变量名通常以非大写字母开头(类名最好使用大写字母)。在
相关问题 更多 >
编程相关推荐