RSelenium - 我无法单击复选框然后单击提交按钮
RSelenium - I can't click in a checkbox and then click in the submit button
我一直在尝试 select 从下拉菜单中选择一项,然后单击复选框,然后单击提交按钮。
但是我无法点击复选框。没有错误或消息。什么都没发生。
我也找不到要点击的提交按钮。
我的代码:
library(magrittr)
driver <- RSelenium::rsDriver(browser="firefox", port=4545L, verbose=F) # Instala o "firefox" e define como padrão para o selenium
remote_driver <- driver[["client"]]
remote_driver$navigate("https://www.bcb.gov.br/estabilidadefinanceira/encontreinstituicao")
Sys.sleep(3)
tableElem <- remote_driver$findElement(using = "xpath", value = "//div[@class = 'container main']//iframe")
remote_driver$switchToFrame(tableElem)
remote_driver$findElement(using = "id", value = "segmento")
option <- remote_driver$findElement(using = 'xpath', "//select[@id='segmento']/option[@value='object:78']")
option$clickElement()
#Not working
relo <- remote_driver$findElement(using = "id", value = "incluirInstituicoesPesquisa")
relo$clickElement()
#not working
pesq <- remote_driver$findElement(using = "class", value = "btn btn-primary")
pesq$clickElement()
我要单击的复选框是“Incluir instituições em regime especial e liquidação ordinária”。
我要点击的按钮是“Pesquisar”。
我错过了什么?
我做到了
relo <- remote_driver$findElement(using = "xpath", value = "/html/body/section/div/div/ui-view/section/div/div[1]/form/div[8]/label")
relo$clickElement()
pesq <- remote_driver$findElement(using = "xpath", value = "/html/body/section/div/div/ui-view/section/div/div[1]/form/div[9]/button[1]")
pesq$clickElement()
我不知道我们可以复制正确的 xpath。
我一直在尝试 select 从下拉菜单中选择一项,然后单击复选框,然后单击提交按钮。
但是我无法点击复选框。没有错误或消息。什么都没发生。 我也找不到要点击的提交按钮。
我的代码:
library(magrittr)
driver <- RSelenium::rsDriver(browser="firefox", port=4545L, verbose=F) # Instala o "firefox" e define como padrão para o selenium
remote_driver <- driver[["client"]]
remote_driver$navigate("https://www.bcb.gov.br/estabilidadefinanceira/encontreinstituicao")
Sys.sleep(3)
tableElem <- remote_driver$findElement(using = "xpath", value = "//div[@class = 'container main']//iframe")
remote_driver$switchToFrame(tableElem)
remote_driver$findElement(using = "id", value = "segmento")
option <- remote_driver$findElement(using = 'xpath', "//select[@id='segmento']/option[@value='object:78']")
option$clickElement()
#Not working
relo <- remote_driver$findElement(using = "id", value = "incluirInstituicoesPesquisa")
relo$clickElement()
#not working
pesq <- remote_driver$findElement(using = "class", value = "btn btn-primary")
pesq$clickElement()
我要单击的复选框是“Incluir instituições em regime especial e liquidação ordinária”。
我要点击的按钮是“Pesquisar”。
我错过了什么?
我做到了
relo <- remote_driver$findElement(using = "xpath", value = "/html/body/section/div/div/ui-view/section/div/div[1]/form/div[8]/label")
relo$clickElement()
pesq <- remote_driver$findElement(using = "xpath", value = "/html/body/section/div/div/ui-view/section/div/div[1]/form/div[9]/button[1]")
pesq$clickElement()
我不知道我们可以复制正确的 xpath。