あるクラスがページで見つかるまで、セレンを待つようにしようとしていますが、いくつかのコードを試しましたが、何も動作していませんでした。Firefoxでセレンを続ける前にクラスが存在するのを待つ
:しようとすると、次の次の
while not firefox.find_element_by_css_selector('.but selected'):
print "test"
time.sleep(1)
戻り
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element
しようの
戻り値:
selenium.common.exceptions.InvalidSelectorException: Message: The given selector but selected is either invalid or does not result in a WebElement. The following error occurred: InvalidSelectorError: Compound class names not permitted
私が間違っているとどのようにそれを修正するのです何を任意のアイデア?