Using Selenium with Excel VBA
![Image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9MxLaSwYNyU9rwhiqdocGtCEH6Lg3AFE4bVdeIJmSE3pH2TyGotIM2r9RpEmqdR7HwmhmxLqDnOq3YgTcDeKdWYvH5J8h6b5eHSHmbAqjmuJgRSs_rG50fudzDa9Velvo9bs1/s320/Selenium+Modal+Dialog+Warning.png)
We had to change the names of 700 students in the student information system that I'm the product manager for at work. Instead of requesting that our support team write a database script, I figured it would be a good opportunity to try using Selenium ( http://www.seleniumhq.org , http://seleniumhq.wordpress.com ) to rename the students using the browser user interface. In the past I have written VBA (Visual Basic for Applications) scripts to control Internet Explorer and I wanted to extend that approach to control Firefox and/or Chrome. Excel VBA provides a very capable environment and the spreadsheet as an underlying model works very well for a class of problems. In this case we have a list of students already in the system and I added a couple of columns to contain the new first and last names. A simple loop through the rows using Selenium calls to manipulate the user interface and then record the results back in the spreadsheet is a straight-forward VBA macro. Of course, wi