title: Null Reference Exception - while using Selenium Web Driver for Automated testing
body: <p>I can enter username,password in the Login page and can navigate to the next page; after that i am trying to click on a button using XPATH during when am getting Null Reference Exception. </p>
  
  <p>The reason based on my research for this exception is that the web driver is pointing to the login(previous) page and so can't find the required element(button) in this(current) page to click. </p>
  
  <p>I know there is an inbuilt method switchTo to make the driver point to this page but i don't know how to use it. I tried a few methods by searching in google but all of them have failed.</p>
  
  <p>how to use switchTo method to make the driver point to current page?</p>