Language of aqConvert.DateTimeToFormatStr
Hello, I have an application that i have to test in English and in French, at different URL-s. One of the things i have to test is, at the last page, a string which, with words, tells me the date of an appointment, and it is of the form Friday, December 13, 2019 ─ 08:00 pm I have the date the form of numbers, i.e. 13 for the day, 12 for the month, and so on. So i put these numbers in a datetime structure and use aqConvert.DateTimeToFormatStr to convert the datetime to a string with the appropriate format modifiers, and compare the obtained string with the string really displayed on the web page. When my page is in English, everything is fine! However, the problem arises when the application is in French. In this case, since my computer has an English language OS, so DateTimeToFormatStr converts the date to a string in an english language, as above. But my application is in French, so it displays the string as: Vendredi 13 décembre 2019 ─ 20:00 pm So my question is, is there any way to tell DateTimeToFormatStr to use another locale, not the default one in English? Or alternatively, is there any way to change via the script the regional settings of my computer temporarily to French, to make the comparison, and to switch them back to English? Of course without stopping the script? The idea is to compare the result of DateTimeToFormatStr with the string displayed by my application, regardless of the app language. All suggestions are appreciated!Solved5.8KViews0likes14CommentsWaiting for OCR checkpoint to appear as screen loads
I'm using a OCR checkpoint to wait for a Citrix application and display a login prompt. When the window appears there's a brief loading screen that displays before the login prompt that I'm using the checkpoint to validate. The OCR checkpoint ends up detecting the loading screen and then failing because it's not the login prompt. Is there a way to set up a delay/wait for the login prompt to appear despite what TestComplete first detects from the object window? It would need to actually wait the specified timeout for the text to appear instead of failing at what it first detects. Thanks in advanceSolved4KViews0likes15CommentsError trying to verify array value from another script unit [//USEUNIT] in current script unit.
I am using TestComplete v11,31,242 and Jscript. I have been using TC and Jscript about three months now. So my understanding is limited. I am creating modular script units for functions that are going to be called repeatedly. Currently scripting search (regression) for patient search (our product is EMR for Hospitals/Clinics). To perform various searches based on patient name, source, account #, MRN, DOB, admission date, department, group etc. So I am collecting all the patient information by searching for the patient, selecting the patient and going to "View Detail Information". Collecting the above information and placing them in an array "pStat". The array function unit is called from the "Search" script unit. Then proceeding to perform searches. Once the patient is found, some of the information collected earlier is used to verify accuracy (property checkpoint). At the checkpoint I am getting an error. If I copy/paste the entire array script into the search script, it runs without any error! Can not figure out how to fix this. Please help. The "array" script: function getPatientStat() { . . . //select patient Aliases.browser.pifHome.aspnetForm.firstPatient.Click(); //view information Aliases.browser.swce.aspnetForm.menuViewInfo.Click(); //get patient info var pStat = []; var pStat = [Aliases.browser.swce.aspnetForm.panelPatientInfo.Name.contentText, Aliases.browser.swce.aspnetForm.panelPatientInfo.ptSource.contentText, Aliases.browser.swce.aspnetForm.panelPatientInfo.acNum.contentText, Aliases.browser.swce.aspnetForm.panelPatientInfo.MRN.contentText, Aliases.browser.swce.aspnetForm.panelPatientInfo.DOB.contentText, Aliases.browser.swce.aspnetForm.panelPatientInfo.aDate.contentText, Aliases.browser.swce.aspnetForm.panelPatientInfo.Dept.contentText, Aliases.browser.swce.aspnetForm.panelPatientInfo.Group.contentText]; The script collecting all the intended information. But failing in property checkpoint in "search" Unit. Property checkpoint: //USEUNIT Patient_Info //gather patient info Patient_Info.getPatientStat(); //select patient Aliases.browser.pifHome.aspnetForm.firstPatient.Click(); //view information Aliases.browser.swce.aspnetForm.menuViewInfo.Click(); //check MRN aqObject.CheckProperty(Aliases.browser.swce.aspnetForm.panelPatientInfo.MRN, "contentText", cmpEqual, pStat[3]); If the array function is included in search script, it runs with no problem. Thanks in advance! DaveSolved3.9KViews0likes8CommentsUnable to retrieve table data due to error (The application was compiled incorrectly)
Hello everyone.I'm using TC11, Desktop application. I faced an issue which is unable to retrieve the table data by using table checkpoint. The error dialog can be referred in the attached image. I have no idea what is the root cause of the error because I don't know is it the software problem or TC11 problem. Anyone know the way to get the reason and what is the technical information means?? Thanks a lot.3.8KViews0likes7CommentsVerifying a URL in Edge
How can I do a property checkpoint on a URL in the Edge browser? I used to be able to do this in IE (see below) but now after switching to Edge, I am not seeing a way to do this through checkpoints. This is the only option I am seeing: aqObject.CheckProperty(Aliases.browser.BrowserWindow, "WndCaption", cmpEqual, "Enrollment Barcodes and 1 more page - Work - Microsoft Edge"); In the Object Spy, I can't seem to do map the actual URL. Is it possible to do this? EDIT: In IE, I could and still can do this: aqObject.CheckProperty(url, "wText", cmpEqual, "URL");Solved3.3KViews0likes9CommentsXML checkpoint fails
I am using an XML checkpoint to check a XML file against the source which is stored in TestComplete. When I run the test, the checkpoint fails.The reason is that the file differs from the source. When I inspect the differences there are no differences displayed. Firstly, I am not expecting any differences. Secondly, why can't I see the differences that triggered the failure? I have included screenshots. Any help/suggestion is appreciated. ThanksSolved3.1KViews0likes3CommentsValidate if object does not exist
Hi everyone I'd like to know if this part of code is the best way to validate if some object does not exist......and if is, best way to do not waste time to checking it. I don't know it there is a method to check NotExist. Thank you so much. var TimeoutValue; TimeoutValue = Options.Run.Timeout; Options.Run.Timeout = 1000; if( (! browseTelaSelecionaControle.Controle15.Exists)&& (! browseTelaSelecionaControle.Controle95.Exists)){ Log.Checkpoint("Controls are NOT visible"); } else{ Log.Error("Controls ARE visible"); } Options.Run.Timeout = TimeoutValue;Solved2.9KViews0likes6Comments[TechCorner Challenge #12] Compare images using the Region Checkpoint
Hi TestComplete Community! Dare to take the challenge?🙂 By completing the tasks, you can practice your skills of working with TestComplete features and also get into the TechCorner Leaderboard! Task: Compare the two images below using TC Region Checkpoint ...and reveal a secret message!Post the message and the script to the comments. Difficulty: Steps to do this: 1. Add the images below to the Regions collection. 2. Perform a pixel-by-pixel comparison using the Check method. 3. Click the “View Comparison Result” button in the log to reveal the secret message and post it along with your script to the comments! Images to compare: Have fun and good luck😊Solved2.9KViews0likes5CommentsMeasure the time it takes for a button to become enabled
Can someone instruct me how I would measure the time it takes for a button to become enabled on the screen. Should I useaqPerformance.Start() or will it be better to useaqDateTime.Now() as a stopwatch when the option is selected and then get the time again once the button is enabled. If you can provide a sample it would be helpful to understand, I read the usage of the methods but not too clear where I can place it in a script. There are areas where I place the wait/pause method to slow down the script but will that affect the time the button from disable to enable state, and how will I present the time in the log file. Use Case scanario 1) User select an image 2) Right-click on the image - a menu appears 3) Select the option to enable "MA" - a dialog appears showing a disabled button. 4) User waits (approx 30 seconds)until the button becomes enabled. - the current dialog shows the button enabled. 5) If the button takes longer than 30 seconds - the test case fails because it took longer than the requirement. //Right Click on image Aliases.browser.pageImagenet.vgSvgslice0.ClickR(347, 138); //Click the option to turn on the button Aliases.browser.pageImagenet.textnodeProcessingmovingaverage.Click(25, 13); //Runs a script routine to pause until the button is enabled. WaitForButton(); //Checks whether the 'contentText' property of the NameMapping.Sys.browser.pageExam.panelResult.panel object equals 'ON' aqObject.CheckProperty(NameMapping.Sys.browser.pageExam.panelResult.panel, "contentText", cmpEqual, "MA\nClose\nON\n0"); //Run the next keyword test. Thank you for your support.Solved2.7KViews0likes13Comments