Contributions
Restarting Test Complete when it hangs and disabling keyword tests auto descriptions
Hi, There are a couple of things I used to know how to do but I can't remember and Google is proving unhelpful... When TestComplete hangs, I remember there is a key combination to trigger the "report error" dialog which allows to restart TestComplete and optionally send a bug report - what is it? I remember there was an option somewhere to stop TestComplete from auto generating Operation Descriptions in Keyword Tests, but again no luck remembering or Googling - where can I find that option? I am using TestComplete 10.50 (will move to v12 sometime soon). Cheers Ory826Views0likes1CommentRe: Runtime Error opening Excel Spreadsheet
Thankslrbehmerfor the solution to the problem! I find it happens when connecting with the Excel OLE object more than once. Your solution works but it has the side effect of closing all open excel worksheets on the computer. Strangely enough I found out it is enough to just access the running process to avoid the issue e.g. Set old_excel = Sys.WaitProcess("excel", 100) Working code (VBScript): Sub UseExcelInSomeWay(workbook, sheetName) Dim app, old_excel 'Handle Runtime error when accessing excel more than once - http://community.smartbear.com/t5/Getting-Started-with/Runtime-Error-opening-Excel-Spreadsheet/td-p/48290 Set old_excel = Sys.WaitProcess("excel", 100) ' Set Excel App Set app = Sys.OleObject("Excel.Application") Set book = app.Workbooks.Open(workbook) Set sheet = book.Sheets(sheetName) app.DisplayAlerts = False ' Excel code here ... book.Close End Sub1.6KViews0likes0CommentsRe: How to use LABEL and GOTO Label in Script
Generally speaking when writing scripts you don't need labels and gotos because it's much easier to construct logical junctions, repeat code (via functions) etc. I'd say that if you are looking for a way to accomplish this you should try changing your way of thinking when composing scripts. If you give a more concrete example in pseudo code I may be able to answer with a solution example. Also see -http://community.smartbear.com/t5/Functional-Web-Testing/Goto-in-VBScript/td-p/696162.5KViews1like0CommentsSetting and working with object variables in keyword tests
Hi guys, I am having some trouble with setting object variables to on screen objects and then working with them. First - why do I need to do this? For various reasons I am in a situation where the Name Mapping already existsand I am notfree to add new mappings to it. This causes a situation where all the objects that are mapped (~75% of objects I interact with) can be accessed via NameMapping, however for everything else I need to find the desired object and then interact with it. Finding the object and setting a variable of type Object to itis easy, but from there on everything is really hard because there is no autocomplete (properties, fields and methods are not available on the object) and validation of keyword steps entered fails continuously. I can't use "On-Screen Action", "Call Object Method", etc. so all I am left with is "Run Code Snippet". I tried looking for articles/forum posts about working with unmapped objects but didn't really find anything relevant. Any ideas/suggestions? Cheers659Views0likes0CommentsRe: TestComplete and Subversion
Not sure about your specific problem but just wanted to give you a heads up that TamTam does not seem to have been developed since May 2010 (that's version 1.30 which is the latest as far as I can tell. Which version are you using?) I am extremely skeptical that it can interact with SVN 1.7 since the way the local copy is stored has changed. In a way we are in the same boat, we have been using PushOK until now relatively successfully however it too does not support SVN 1.7 (they released an RC but it is not working for us). For now what we are doing is running 1.6.16 client on our machines, it connects ok to the SVN Server (which is 1.7). However we are on the lookout for plugins supporting 1.7 and that's how I have reached this thread (no luck so far).3.1KViews0likes0CommentsCannot post HTML to the Additional Text
Hi, I've tried both in a KDT as well as a script and a simple bit of HTML does not get posted properly to the Additional Text field (gets posted as plain text - see attched image). To make sure that it is not my error, I copied the code from the following TC blog: http://blog.smartbear.com/post/10-03-22/TestComplete-8-Sneak-Peek-Posting-HTML-Messages-to-the-Log/ Example code (JScript): Log.Message ("Log Message ", "<html><body><p>This is my <b style=\"color : green\">HTML</b> message. </p> </body> </html>"); I have even tried adding the following code prior to the above line to make sure the ExtendedMessageAsPlainText attribute is equal to false: var Attrs = Log.CreateNewAttributes(); Attrs.ExtendedMessageAsPlainText = false; TestComplete ver 8.70. Thanks!23KViews0likes1CommentRe: LogParams changed behaviour on TC 8.5
For future reference of anyone finding this thread, I've added new lines instead of breaks and 2 new lines instead of paragraph end tags. I've also trimmed leading spaced. The function now looks like this: function Strip_HTML( html ) { var stripStyles = new RegExp( "(<style[^>]*?>(.+?)(</style[^>]*?>|$))", "g" ); var stripScripts = new RegExp( "(<script[^>]*?>(.+?)(</script[^>]*?>|$))", "g" ); var stripAllTags = new RegExp( "(<[^<]*?>)", "g" ); var text = html.replace( stripStyles, "" ); text = aqString.Replace( text, "<br/>", "\r\n" ); text = aqString.Replace( text, "</p>", "\r\n\r\n" ); text = text.replace( stripScripts, "" ); text = text.replace( stripAllTags, " " ); text = aqString.Trim( text, 1 ); // Expand common entities var entityMapping = {}; entityMapping["""] = "\""; entityMapping["'"] = "'"; entityMapping["<"] = "<"; entityMapping[">"] = ">"; entityMapping[" "] = " "; entityMapping["&"] = "&"; for (var key in entityMapping) { text = text.replace(new RegExp(key, "g"), entityMapping[key]); } // Remove duplicated spaces text = text.replace(new RegExp("(\\s){2,}", "g"), " "); return text; }1.5KViews0likes0Comments'Save Read-Only Storage' notification when enabling/disabling operations in KDTs
'Save Read-Only Storage' notification when enabling/disabling operations in KDTsthat are checked in When we enable or disable operations in KDTs that are checked in, and then save the KDT we get the 'Save Read-Only Storage' prompts. The correct behaviour would be for TestComplete to prompt the user to check out the KDT when enabling/disabling operation.19KViews0likes2Comments