If-statement in RSelenium

I have a vast list of chemicals for that I need to extract the CAS number. I have written a for loop which works as intended. However, when a chemical name is not found on the website, my code obviously stops. Is there a way to account for this in the for loop? So that… Read More If-statement in RSelenium

How to extract text using RSelenium

I have the following HTML: <h3><a href=’jobdetail.php?job=705945′>Job Details</a>: lrp1_vs_Hx1sh2</h3><h4> With this code, I tried to extract the element value lrp1_vs_Hx1sh2 library(RSelenium) webpage <- "https://cluspro.bu.edu/models.php?job=705945&quot; browser <- remoteDriver(port = 5556) browser$open() browser$navigate(webpage) clk <- browser$findElement(using = "link text", "Use the server without the benefits of your own account") clk$clickElement() jobs <- browser$findElement(using = ‘link text’, "Job… Read More How to extract text using RSelenium