i have following html element in webpage:
<a target="parent" href="/bin-din/webob/mom.ko/6/wo/asaksdaksjd /5.1.5.5.33.23.23">view data set</a>
i use following command in rselenium find tag:
webelem<-remdr$findelement(using = 'xpath',"/html/body/div/table/tbody/tr/td/table[2] /tbody/tr/tbody/tr/td/font/a[1]")
then use following command click on link:
webelem$clickelement()
now link opens in new page, because html tag includes target="parent". how can open link in same tab in remdr? suggestions? thanks
first need clear target attribute blank injecting javascript in web element.
then can sclick on , open link in same tab. code somehow
webelem<-remdr$findelement(using = 'xpath',"/html/body/div/table/tbody/tr/td/table[2]/tbody/tr/tbody/tr/td/font/a[1]") remdr$executescript("arguments[0].setattribute('target', arguments[1]);", list(webelem, "")); webelem$clickelement()