Hello Akanksha, Robot Class is used for those tests cases which needs to control keyboard or mouse to interact with OS windows like Download pop-up, Alerts, Print Pop-ups, etc. or native Operation System applications like Notepad, Skype, Calculator, etc. Selenium Webdriver can't handle these OS pop-ups/applications. Some of the commonly used methods of Robot class for web automation are:
- keyPress()
- mousePress()
- mouseMove()
- keyRelease()
- mouseRelease()