Selenium WebDriver Code for PeopleSoft Sub Page
I am new to Selenium WebDriver World. I am trying to work on a script to Add a Person in PeopleSoft HCM Application. Basically, On the Personal Data Main page, you first start by adding a Effective Date in to a Date Field and click on Add Name button that opens a Sub Page on the Main page. The Sub Page has First Name , Middle Name , Last Name etc fields. You enter this fields and click OK to go back to Main Page and carry on other data entries.
When I recorded through Selenium IDE, it clicks on the Add Name Button and the sub page opens and the IDE can enter text to the name fields. However when I am using the Web Driver Code, it is not able to push the data to the sub page.
How can I get hold of the sub page through the code. I tried the driver.switchTo().window command , and this is not working.
Any Help on this would be a great help.
Here's a Screen shot for the Main and Sub Page: