倒计时结束以后没获取到按钮(再运行有了但就要排队了。。)
burn1ngsun opened this issue · 1 comments
Traceback (most recent call last):
File "C:\Program Files\Python37\lib\threading.py", line 917, in _bootstrap_inner
self.run()
File "C:\Program Files\Python37\lib\threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "e:\DEV\HUAWEI STORE DEV GO.py", line 351, in loginMall
goToBuy(driver, user)
File "e:\DEV\HUAWEI STORE DEV GO.py", line 186, in goToBuy
if buyButton.get_attribute('class') != 'product-button02 disabled':
File "C:\Program Files\Python37\lib\site-packages\selenium\webdriver\remote\webelement.py", line 141, in get_attribute
File "C:\Program Files\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 636, in execute_script
'args': converted_args})['value']
File "C:\Program Files\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Program Files\Python37\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: element is not attached to the page document
(Session info: chrome=88.0.4324.182)
我运行了几次没有发现这个问题,但根据你的报错,我尝试解决了这个问题,下一个版本应该可以解决
至于排队,emmmm,这就是华为商城鸡肋的地方,不管你手速快慢,点申购后都显示排队,剩下就是看命。。。。就算不出错,一次成功,进的也是排队页面哈哈哈哈没办法