Contributions
Re: OCR results in dots
I wasn't able to get OCR working on the target window. I was able to leverage the fact that the subscription number I was trying to read is generated by a database. So I wrote a function using ADO objects to run a query against the database and then I read the resulting recordset to get the value I needed.1.7KViews0likes0CommentsOCR results in dots
Hello; I am building tests which include taking action and reading information from an application provided via remote desktop. Because it is coming across remote desktop, I have very little visibility into the application from the object browser. Specific to this question, I can't get the text objects appearing in pop-up windows. As an aside, I have tried to enable TextObjects per these instructions, but the object browser is not listing the objects, nor can I access them through code. Therefore, I am trying to read the text using the OCR module. I have attached an image of the window (Information) I am trying to OCR. I was previously trying to perform OCR against just the number (4300836 in this case), but that was consistently failing to recognize any text at all. I have experimented extensively with trying different fonts, fontsizes, and changing the active recognition set. My best guess is that it is failing due to the greyscale binarization - but I've experimented with some values between 0-255 and have not found any value that improves OCR performance. For comparison, I find that when I run OCR on a screen that looks like the blue-grey screen with what appears to be MS Sans Serif text, the results are pretty good using just the default options. Any ideas on how I can get better insight into improving the OCR performance? I'm also open to alternative solutions - I don't care if OCRfactors into the solution or not - I'm just looking to capture that number from the screen. Thanks in advance for any help.Solved1.8KViews0likes3CommentsRe: Configuring TestComplete to work with PDF files
I believe I have the problem solved - I am now able to see member methods and properties using the code completion function in TestComplete (see attached screenshot). I think the root cause of my issue was version incompatibility. I downloaded and used jars from different PDFBox versions, and I had to go back to 1.8.9 to find a version that worked with TestComplete 10.3.7KViews0likes1CommentRe: Configuring TestComplete to work with PDF files
So I've spent a fair amount of time going through your linked document, butI haven't been able to do what I actually need to do yet - which is to create a PDDocument object in order to access a PDF file. I have discovered that code completion works fine for other lines (see attached screenshot for details - you can see that the code completion context menu shows several flavours of newInstance). But I can see any properties or methods beneath the PDDocument object of the next line down. I've experimented with both PDFBox 1.8.13 and PDFBox 2.0.6 jar files. I've also checked the capitalization of my java classes several times. I'm stumped. Any ideas on what I should check next?3.6KViews0likes2CommentsConfiguring TestComplete to work with PDF files
Hello; I am trying to configure TestComplete to extract text, images and other content from PDF files. I have followed the Preparation Steps, listedhere, but when I run the loadDoucment()function, TestComplete throws an error saying the object doesn't support this property or method. function loadDocument(fileName) { var docObj; // Load the PDF file to the PDDocument object docObj = JavaClasses.org_apache_pdfbox_pdmodel.PDDocument.load_3(fileName); // Return the resulting PDDocument object return docObj; } I have tried to use both different versions of PDFBox(1.8.13 and 2.0.6), but it doesn't seem to make a difference. I've also tried to use the code completion functionality built into theTestComplete scripteditor to "walk" into the classes and methods. When I do this, it looks like PDDocument is a property of org_apache_pdfbox_pdmodel, but not its own class with child methods and properties. Ultimately, I need to be able to use the PDFBox library functionality, so more information about how to do that would be fantastic, but failing that, perhaps some information to have TestComplete validate the configurations I've made so far and confirm they are correct would also be useful. To be clear, I copy/pasted the information by hand from the help page, and have manually re-checked all the configurations made in JavaBridge, but I can't see where the given configurations and my local configurations are different. Can anyone help?Solved3.7KViews0likes6CommentsMake an Excel file hosted on SharePoint editable
Hello - Ihave an excel file hosted on a SharePoint server that I am using tostore some data stored while my test was running. When I open the file, it is being opened in Read-only mode, which prevents me from saving my chages to the document. Here is the function that I'm using to write the data to Excel: function writeToExcel(fileName, sheetName, data, col, row){ //assume data is a value (int, string), and not an object Log.Message("STARTFUNCTION STARTFUNCTION WriteToExcel(" + fileName + ", " + sheetName + ", " + data + ", " + col + ", " + row + ") STARTFUNCTION STARTFUNCTION"); //Open Book, Sheet. Ready Excel for use. var app = Sys.OleObject("Excel.Application"); var book = app.Workbooks.Open(fileName); var sheet = book.Sheets(sheetName); app.DisplayAlerts = false; //Write the ID in the current cell sheet.Cells(row, col) = data; //Save the book. book.Save(); app.Quit(); Log.Message("ENDFUNCTION ENDFUNCTION WriteToExcel() ENDFUNCTION ENDFUNCTION"); } I think what I need to do is to perform an additional action on the workbook, before I try to save data to the file. Any ideas?851Views0likes1CommentNeed help finding a webinar showing use of XPath
Hello - I am relatively new to TestComplete and am still learning the ropes. Some time ago, I watched a webinar (hosted on the SmartBear website) onnamemapping, and I recall the presenter was showing code with allowed him to select objects with the EvaluateByXPathmethod and the Sys.HighlightObject method. At the time, it was completely over my head. Now I have developed more skill in TestComplete and I would really love to be able to find that video again, but I can't (and not for lack of searching). Can anyone point me towards this video, or point me towards a repository of videos that I can scan and manually search for the content I'm seeking?Solved1.1KViews0likes1CommentPage not found leads to "Object Required" Error. How to execute alternative steps instead?
Given the following code, I am able to open Internet Explorer to "about:blank" and the script, when run, will log a 1. However, if I change the page to an alternative page, the function crashes. I cannot get it to log a 2. How do I have TestComplete perform some alternative steps in the event that a page doesn't exist? function Test(){ if(Sys.Browser("iexplore").Page("about:blank").Exists) { Log.Message("1"); } else{ Log.Message("2"); } }Solved1.6KViews0likes3Comments