Contributions
Re: Stripping data of pdf files - used to work, now has error "Object doesn't support this action"
The file "pdfbox-app-1.8.8.jar" was reloaded (in case it was corrupted), and this did not solve the issue. Issue was eventually solved. Step 1. Updated the JRE (Java Runtime Environment) to the latest version. Step 2. In the Menu Bar, select "Tools", then "Options". Go to "Engines", then "Java Bridge". Select the latest JVM (java Virtual Machine) path. See picture "TestComplete-JAVA-Bridge-B.JPG". Step 3. Under the Project "Properties", "java Bridge", both the "Java Classes" and the "Class Paths" were deleted, then reloaded. See picture "TestComplete-JAVA-Bridge.JPG". These two steps fixed the issue. Test Complete does not automatically JVM path after a Java update.4.8KViews2likes3CommentsRe: Stripping data of pdf files - used to work, now has error "Object doesn't support this action"
Hi Alex, Many thanks for the reply. Took me a while to find where the path was to call the PDFBox file, I finally did - In the Project Properties, under section "Java Bridge". The path already points to version 1.1.8, as you can see from the attached file "PDF-Box3.png", which is what you suggested to do/change to. Unless I am missing something, I have no idea what to do now. Any suggestions as for the next step? Thanks heaps! Jose ~~~~~~~~~~~~~~~~~~~~~~~4.9KViews0likes0CommentsRe: Stripping data of pdf files - used to work, now has error "Object doesn't support this action"
Hi Alex, Many thanks for the reply. It took me a while figure out where the PDFBox file pointer is. I found it in the Project Properties, under the section Java Bridge. The path points to the executable "pdfbox-app-1.8.8.jar", see the attached screen print PDF-Box2.PNG. So, it appears that Testcomplete is already using the PDFBox 1.X version, as you have suggested, unless I am looking at the wrong setting. Based upon this, do you have any other suggestions? Thanks heaps! Jose ~~~~~~~~~~~~~~~~~~~~4.9KViews0likes0CommentsUsing an external file to test for testing a multilanguage GUI
MOVED TO SECTION "Desktop Testing", SINCE INCORRECTLY POSTED IN THE "General Discussions" section. ~~~~~~~~~~~~~~~~~~~~~~~~ We have an application that interfaces with the user via a computer screen. The screen has many software buttons that can be clicked with a mouse. i.e. buttons like START, STOP, SURNAME, etc. I currently simulate the press of a button with a ‘Click’ function. I intend to verify the contents of the button, which I believe can be done with a ‘Property Checkpoint’. So far seems simple. The next revision of the software is to include translation of the buttons on the screen into several languages – European and Asian, maybe up to 20 languages. I think it will be a logistic nightmare to make a .pjs file for each language, and then maintain them all at the same level as changes and updates occur. My thinking is to be able to access an external file (similarly as done with a DB Table with an XCEL or CVS file), that has the translation for every word that I need. I have found a way to access an external file for external text input (with a DB Table), but I have no idea how to do it for a button content (which is I believe a property called ‘WndCaption’). Does anyone have any suggestions how to access an external file (for the purposes of incorporating various translations) to check the contents of the displayed text on a screen button?616Views0likes1CommentUsing an external file to test for testing a multilanguage GUI
We have an application that interfaces with the user via a computer screen. The screen has many software buttons that can be clicked with a mouse. i.e. buttons like START, STOP, SURNAME, etc. I currently simulate the press of a button with a ‘Click’ function. I intend to verify the contents of the button, which I believe can be done with a ‘Property Checkpoint’. So far seems simple. The next revision of the software is to include translation of the buttons on the screen into several languages – European and Asian, maybe up to 20 languages. I think it will be a logistic nightmare to make a .pjs file for each language, and then maintain them all at the same level as changes and updates occur. My thinking is to be able to access an external file (similarly as done with a DB Table with an XCEL or CVS file), that has the translation for every word that I need. I have found a way to access an external file for external text input (with a DB Table), but I have no idea how to do it for a button content (which is I believe a property called ‘WndCaption’). Does anyone have any suggestions how to access an external file (for the purposes of incorporating various translations) to check the contents of the displayed text on a screen button? This topic was originally incorrectly posted in section "General Discussions".756Views0likes1CommentStripping data of pdf files - used to work, now has error "Object doesn't support this action"
I have the below script (written by an engineer that left 3 months ago), that was used to strip data from a pdf file, for the purposes of verifying that the contents are as expected. It always worked without errors. A few weeks ago (the script was never changed) it stopped working, and I get an error: "Object doesn't support this action". Stepping through the debugger, the error comes from the below line: " var docObj =JavaClasses.org_apache_pdfbox_pdmodel.PDDocument.load_3(strFileName); " I have searched, and I have trouble finding any information on ".load_3". Changing it to "load" causes the same error. The code seems to invoke a Java function, and as we all know, JAVA updates automatically. Just wondering, has anyone had any experience with this JAVA function, or could explain why the sudden break? The full stripping script is below: " // Strips and returns text from a pdf file in C:\ called rpt.pdf function stripText() { try{ //var strFileName = Sys.OleObject("WScript.Shell").SpecialFolders("Desktop") + "\\rpt.pdf"; //"C:\\Users\\rnd.AU\\Desktop\\rept.pdf"; var strFileName = ProjectSuite.Variables.XCEL_PATH + "\\rpt.pdf"; Log.Message(strFileName); // var doc=JavaClasses. // Load the PDF file to the PDDocument object var docObj =JavaClasses.org_apache_pdfbox_pdmodel.PDDocument.load_3(strFileName); // SUDDEN ISSUE WITH THE ABOVE LINE // Create text stripper object var textStripperObj = JavaClasses.org_apache_pdfbox_util.PDFTextStripper.newInstance(); // strip text from the entire document var text = textStripperObj.getText_2(docObj); // Voila! Log.Message("Text from rpt.pdf stripped..."); Log.Message (text); return(text); } catch (e){ Log.Error(e.description); } } "Solved4.9KViews0likes7Comments