Source: Tumblr

RSelenium’s sendKeysToElement command is not working out for you? If so, I may have a solution to offer.

TL;DR

Text boxes are practically everywhere — we use them to google, to log into our online accounts. It’s used to prompt feedback from a webpage based on a keyboard input. Therefore, learning how to interact with them is often crucial to a successful web scraping and automation task. RSelenium’s vignette has a straightforward two-step solution using sendKeysToElement, as summarized below:

Step 1. Locate Textbox in the DOM and assign to WebElem

Step 2. Use command sendKeysToElement(key). …


Are you looking for someone to take over the repetitive web data scraping tasks? Consider RSelenium as your new assistant, for free!

“Who is RSelenium?” You may ask. RSelenium, the R bindings that allows automation of repetitive web-based tasks, such as finding and copying data, using the Selenium WebDriver, was introduced to me by a talented colleague of mine. With very basic knowledge of R, and even less knowledge of HTML, at first sight, RSelenium seemed a bit standoffish. I was assured that things would get easier once I get to know RSelenium a little better. So there it began…


Many websites these days require two-factor authentication (2FA) at login, which presents a challenge for automation. I ran into this situation recently when I needed to extract some data from the Salesforce platform. This article will take you through the journey how I arrived at the final solution; and as always, here goes the TL;DR.

Selenium+Cookie+Einstein? Source: Selenium, Salesforce. Doodle by: IMoya

Before we tackle the ‘how-to’s, it helps to understand what the Salesforce 2FA process entails. This security feature is required at each login after users input their username and password. One of the options supported by Salesforce is through the free Salesforce Authenticator App on…

Siqi Zhu

Learning data science tips and tricks with me.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store