Dropbox and Selenium WebDriver
In this article, I will explain about how to successfully enter Dropbox website with credentials using Selenium WebDriver methods. Dropbox is a popular cloud based storage provider whereas Selenium is a popular open source automation testing tool. In our Selenium training in Chennai course, we use hundreds of this kind of examples to make concepts practical to our students. So, follow these steps , you can automatically login to Dropbox.
- First initiate the WebDriver for particular browsers (Firefox, Chrome Internet explorer etc) and launch the browser
- Make the WebDriver access the URL https://www.dropbox.com
- Make the WebDriver find the element “Email” using any element locators like id, xpath etc and pass the correct email id to that element using sendkeys method.
- Make the WebDriver find the element “password” using any element locators like id,xpath etc and pass the correct password to the element using sendkeys method.
- Use element locator id and make WebDriver find the login button and perform click operation using click() method.
This article is published by Metaforum Solutions, a leading SEO company in Chennai on behalf of Metaforum Technologies.
Get Metaforum Tech’s stories in your inbox
Join Medium for free to get updates from this writer.
While the above steps successfully opens browser and send username and password values and login as well, the following steps will check if the login is successful or not.
6. Look for the URL https://www.dropbox.com/h after sucessful login.
7. Store the value https://www.dropbox.com/h in a string
8. Using getCurrentURL() method get the value of URL post login operation.
9. Using anyone of the string functions like contains() check if the value returned by getCurrentURL() method matches the string value already saved. (that is expected URL).
10. If this verification point test is successful then Dropbox login using Selenium WebDriver was successful. Else you have entered invalid credentials to login.



