<tr id="GBPUSD" class="filled" title="Great Britain Pound vs US Dollar
Calculation: Forex
Trade: Full access" draggable="true" style="background: rgb(255, 255, 255);"><td
id="symbol" class="symbol"><div class="container"><span class="content">
<span class="i down"> </span>GBPUSD</span></div></td>
<td id="bid" class="down" style="text-align: right;">
<div class="container"><span class="content">1.28106</span></div></td>
<td id="ask" class="down" style="text-align: right;"><div class="container">
<span class="content">1.28116</span></div></td><td></td></tr>
Это HTML-код для элемента, на который я хочу дважды щелкнуть с помощью селена.
elem = driver.find_element_by_xpath("//tr[@id='GBPUSD']")
elem.click()
elem.click()
Это мой код Python, но я получаю сообщение об ошибке:
selenium.common.exceptions.InvalidSelectorException: Message: invalid selector:
Unable to locate an element with the xpath expression //*[@id='symbol']/div]
because of the following error:
SyntaxError: Failed to execute 'evaluate' on 'Document': The string '//*[@id='symbol']/div]' is not a valid XPath expression.
(Session info: chrome=78.0.3904.87)
Пожалуйста, помогите мне :(