Hi, I am trying to verify that the date shown on my application is today’s date. How can I do that?
Question ID: 106792
0
0

I have an object that displays today’s date. How can I verify that the date displayed is the correct date? I am not looking to verify the format but the actual date.

Thanks

Marked as spam
Posted by (Questions: 2, Answers: 1)
Asked on April 26, 2016 8:00 pm
49 views
Answers (2)
0
Private answer

Hi nrahman,
Could you provide a little more information and details as to what you are trying to accomplish?

What program are you using that you would like to verify the date through (QTP/UFT, Sprinter, etc) and what is displaying the object you are referring to (an application, page within a browser, etc)?

How is the object formatted (as this makes a difference in how the compare would occur)?

As your question is stated it is quite vague and requires more detail to be able to provide a more accurate and appropriate solution.

Thanks,
Dan

Marked as spam
Posted by (Questions: 0, Answers: 770)
Answered on April 27, 2016 1:37 pm
0
Private answer

Hi Dan this is the code that I am trying to fit into my test:
************************************************
Dim dateDisplayed
dateDisplayed = Browser('''').Page('''').WebElement(''04/25/2016'').GetROProperty (''innertext'')

msgbox dateDisplayed **'Displays the date as 04/25/2016**

Dim y

y = date() **'Displays the date as 04/25/2016**

If dateDisplayed = y Then
msgbox ''Date is displayed correctly''
End If
***********************************************

When UFT tries to run the line ''If dateDisplayed = y Then'' it closes the test. I just need to verify the date displayed.

Marked as spam
Posted by (Questions: 2, Answers: 1)
Answered on April 27, 2016 3:41 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top