Solved
Forum Discussion
9 Replies
- Marsha_R
Champion Level 3
I wouldn't put Today() on a data sheet. Just use it directly in the test. It will always be current that way and you won't have to update it. - Marsha_R
Champion Level 3
Do you read the Excel sheet every time you run the test? It's not clear to me why a regular project or test variable would not work for you. - srinivas_yadatiOccasional ContributorHi
Thanks for the Reply!!!!
actually i am using some functions in the excel sheet like Today().
So it is not updating the values of that cells , another day when i run the test ,It is only taking the old values which is assigned earlier or first run the test.
I tried all the methods like ALE Driver and COM objects ,but there is no effect on the excell cells updation.
Only thing i found is we have to open the sheet every time before run the test(manually or Through script) ,it is working some way.. - srinivas_yadatiOccasional ContributorHi,
Thanks Again Marsha Robertson
Eeven i tried in that way also but the fuctions i want with date ,time and week number are complex in the smart bear they are not fecthing in the way(format) i want to validate through the check points .So its made or make simple for me if they fectches from sheet
thats way presently i am opening the sheet before running Test Case(through script only)
like
function test()
{
//code
var fileName = "..//path.xlsx";
var sheetName = "Sheet1";
var app = Sys.OleObject("Excel.Application")
Options.Run.Timeout = 30000;
var book = app.Workbooks.Open(fileName);
var sheet = book.Sheets(sheetName);
book.Save();
//code
app.Quit();
}
some times this raising popup like do u want save the changes in the excel
in that case my test case in failing/reporting an error
if we have any solution its better
for thar i am going use event handler..(learing)
Thanks in advance.. - Marsha_R
Champion Level 3
Okay, a couple more questions.
Are your tests in keyword format or in script format?
Can you give me an example of the date/time you want to validate? - srinivas_yadatiOccasional Contributorhi
My tests are in Script format
ex for validation date is "Monday mm/dd/yyyy"
Every day date and day need to be changed (today) - Colin_McCraeCommunity HeroIf you're using Excel as a COM object you can disable the notifications popups ....
app.DisplayAlerts = False
Should do it in your case. - Marsha_R
Champion Level 3
I think you can use this to get the day/date format that you need.
http://support.smartbear.com/viewarticle/58617/ - srinivas_yadatiOccasional ContributorThanks Marsha Robertson
I Verified this solution earlier its meeting code metric standards and not effective i feel
but
I agreed with the solution provided by the Colin McCrae ,its working fine
Once again Thanks for the Support Marsha Robertson Colin McCrae