Friday, 9 August 2013

How to Capture Date Using QTP on a Sharepoint Application

Map the inner text value with the Environment. I had mapped it with Environment “text”
Code is as follows -
‘Clicking the main link
Environment.value(”text”)=”January 2012″
Browser(”Abu Dhabi Securities Exchange”).Page(”Abu Dhabi Securities Exchange”).Link(”March 2012″).Object.click()
Selecting the year
Environment.value(”text”)=”2011″
Browser(”Abu Dhabi Securities Exchange”).Page(”Abu Dhabi Securities Exchange”).WebElement(”year”).Object.click()
‘Selecting the month
Environment.value(”text”)=”Jul”
Browser(”Abu Dhabi Securities Exchange”).Page(”Abu Dhabi Securities Exchange”).WebElement(”Month”).Object.click()
Browser(”Abu Dhabi Securities Exchange”).Page(”Abu Dhabi Securities Exchange”).WebButton(”Apply”).Object.click()
‘Selecting the date
Environment.value(”text”)=”12″
Browser(”Abu Dhabi Securities Exchange”).Page(”Abu Dhabi Securities Exchange”).Link(”16″).Object.click()

No comments:

Post a Comment