I'm trying to get the value of an id that has space in between, using selenium. The HTML looks like this
<div id="buyAlchemy lab" onclick="Buy('Alchemy lab');" style="background-image:url(labicon.png);" class="grayed">Turns gold into cookies!</div>
How can I select this id's text?
If I do
driver.find_element_by_css_selector("div #buyAlchemy lab").text
I'm getting an error which says
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"div #buyAlchemy lab"}