I am scraping yahoo finance and on financial tables there are "quarterly" and "expand all" clicks. When I inspect on buttons gives me <button class= expandPF Fz(s)....................." and I don't how to do it in CSS. the
Please Help!! :)) Thanks in advance
CodePudding user response:
You can try using xpath to click Expand and Collapse
remDr$findElement('xpath', '//*[@id="Col1-1-Financials-Proxy"]/section/div[2]/button')$clickElement()
CodePudding user response:
I also tried;
> webElem <-remDr$findElement("xpath", "//*[@id='Col1-1-Financials-Proxy']/section/div[2]/button/div/span")$clickElement()
Selenium message:No active session with ID b3685d1143434ead399da8235261106f
Error: Summary: NoSuchDriver
Detail: A session is either terminated or not started
Further Details: run errorDetails method
but get this error. If anyone has an idea please help :))
