aLostDawgOccasional ContributorJoined 13 years ago15 Posts11 LikesLikes received3 SolutionsView All Badges
ContributionsMost RecentMost LikesSolutionsIE11 BrowserWindow different than IE10 BrowserWindow I'm testing an application on multiple IE versions (IE8, IE9, IE10, and IE11). I have a TestComplete license on my IE8 machine and my IE10 machine and so far this has been working well for all of my needs. Most objects in IE9 are either like IE8 or IE10, but I ran into a snag. The BrowserWindow object has changed between IE10 and IE11. I have mapped the BrowserWindow in IE10 using the following attributes. ObjectType = BrowserWindow WndCaption = *Windows Internet Explorer This works for IE8, IE9 and IE10, but TC can't find the IE11 object using these attributes. I'd upgrade my IE10 box to IE11, but the last time we did that the box never worked like a true version of IE10 again and it had to be rebuilt to get it back to a clean IE10 version. Does anyone know what the WndCaption value for IE11 is? Or does anyone know another attribute that I could use to replace the WndCaption that would work for all 4 versions of the IE browser? Thanks in advance, JC Re: Test Execute not getting started through Batch File from second run onwardsAmit, did this solve your problem? If so, could you mark it as solved for future users? If not, let me know what issues you're still having and I'll try to get you help for them too. Re: Test Execute not getting started through Batch File from second run onwards I can't really talk to the point of using the Tested Applications to kick off a batch file. Is the batch file shutting down TestExecute, or is TestExecute shutting itself down? I'm wondering if this is the issue. What I have found when I'm using batch files to start up TestExecute is that if TestExecute is running when the batch file tries to start TestExecute it throws an error. Sometimes this error pops up on the screen and sometimes it doesn't. This could be tied into whether or not you're running it in SilentMode. Here's what I do to break up my test run. 1. I use a command line argument and a command line argument parser. You can read a little more here or see the "BuiltIn.ParamCount" and "BuiltIn.ParamStr' help topics. 2. I set up a batch file similar to the following: - pull date and time from system and put them into a couple of variables. - Call TestExecute using start /wait "TestExecute" "C:\Program Files[your specific location for test execute]\TestExecute.exe" [.pjs file location] /r /p:[project name] /e /SilentMode "Server=[server location]" "testcase=[TestCaseName]" - Copy the tcResults1.mht to another file using batch copy command and postpending the system date/time to the end so that if I run it on another server at about the same time it will have a unique name. Copy "C:\Users\[username]\AppData\Local\Temp\tcResults1.mht" "[new location]\[new name]" - Kill the IE instance that has the test results open taskkill /f /im iexplore.exe In the above the italics is code. Stuff in [brackets] should be replaced by your info. This should give you some more things to try. Re: No more threads can be created in the system errorI'm getting this issue, but it's only happened on a script where there are a large number of scenarios. It dies on Scenario 190. A little background: Automation framework built in VBScript. Pulls data from an external data sheet. Dynamically builds the form info model at the runtime of the automation framework. Form has about 30 fields. Total number of scenarios = 492. About half way through Scenario 190 it fails with this error. I assume that there is some garbage collection that I need to add to my VBScript code, but the error doesn't give me any indication as to where that might be. I'm going to play around with this to see if I can get around this error, but it might not even be wise. The test results .mht file is already over 864000 KB and is painful to try to navigate. Re: extract text from web page and assign it to a variableGlad you got it working. Thanks for the feedback.Re: extract text from web page and assign it to a variable Most of my tests are written in VBScript so I may not be the best to answer this question for you, but let me give you some suggestions from my experience. Maybe that will get you going in the right direction. I'll assume that if you can pull this information from the page (table cell) using Selenium that you know the tabel cell object that you're trying to pull from. For Keyword tests try this: 1. Bring up the page on the 'AUT' (Application Under Test). 2. Select the 'Set Variable Value' from the 'Statements' operations. 3. Select the variable that you want to save the value in and click 'Next'. 4. Select 'Onscreen Object' and click on the '...' box on the right of the 'Value' text area. 5. Select the table cell object using one of the ways in the 'Select Object' dialog. That should get you down the road on Keyword tests. Now I'll give you an example of what I would do using VBScript. 1. Start by setting the object varible to the table cell the value is in. This is an object that is in your Name Mapping. In VBScript you have to use Set to assign an object to a variable. Set objToGetValueFrom = Aliases.browser.page.panelContent.table.cell 2. Assign the table cell value to a variable. In VBScript I use GetAttribute and then use the attribute name, in this example 'innerText', to tell it which attribute to get. This is where using your developer tools will help you to find the right attribute that you want to pull from the object. Other attributes could be 'outerText', 'isEnabled', 'bgColor', 'href', etc. strValue = objToGetValueFrom.GetAttribute("innerText", text) The strValue variable should now contain the value of the attribute innerText of the objToGetValueFrom object. Obviously if you're using another language for scripting this will look a little different, but I hope this gets you a little bit further down the road. Let me know if this doesn't make sense. JCRe: extract text from web page and assign it to a variableCould you give a few more details? Are you using Keyword tests, or a scripting language? If you're using a scripting language which one? What sort of code base are you working with? These all will affect how you extract text from a webpage. You can check the attributes of the webpage element that you want text from if you use some sort of tool to inspect the webpage. For example IE has Developer Tools (F12). Let us know some more details and someone will get you some help. Re: Scheduling test run on a Virtual MachineTo have a user still logged on and the TestExecute instance fooled into thinking that the VM is still outputting an image to a screen you need to send to console. Create a batch file on the desktop of the VM with this one line in it. tscon 2 /dest:console Then run that (double click on it). This should disconnect you from the VM and send the images to console. It leaves the user that is logged on still logged on. This makes TestExecute believe that the image is still on a screen. Therefore TestExecute won't give you the "The operation cannot be performed, because the user session is disconnected." error. Hope this helps.Re: Scheduling test run on a Virtual Machine I assume that you have TestExecute9 loaded on the VM. If so you should be able to do this. There are a few things you'll have to have set up to accomplish this though. 1. VM user that is logged on all the time. 2. Batch file set up on the VM to execute the specific test. 3. Task Scheduler set up to execute the batch file. To accomplish #1 we use a batch file that disconnects from the VM and sends the output to the console. This way TE can still execute the script because there is a screen image being generated to the console. Number 2 is just the command line code in a batch file. Number 3 calls the batch file and executes it daily for us. You can set it up on whatever schedule you'd like. Re: selectSingleNode using vbscript Xpath is supported in VBScript in TestComplete. I use it almost exclusively to find elements in web pages that may be dynamic at runtime. And it prevents me from having to build a name mapping that is enormous. The methods in VBScript in TestComplet are a little different. You'll probably want to use the FindChildByXPath method. Do a quick search on 'xpath' in the TC help and you'll find more info, but here's what I would try. CAVEAT: I'm using this to find objects on webpages, not in pure XML files, so it might be slightly different. You will want to make sure that your base object (xmlDoc) is correct because that can throw you off. I think the last '/' in your xpath1 may be throwing it off. Just try to locate the node without using the '@value'. Then once you have that node, then ask for the '@value'. Also, it's easy to forget, but you have to use 'Set [object variable name]' to assign the node object to an object variable in VBScript. 'set your xpath variable xpath1 = ".//add[@key = 'LogsDirectory']" 'execute the FindChildByXPath method and assign the object to LogsDirectory Set LogsDirectory = xmlDoc.FindChildByXPath(xpath1, False) 'now that you have the node object get the value of the 'value' attribute sLogsDirectoryValue = LogsDirectory.GetAttribute("value", text) Again, this may be a little different since I'm using it on a webpage and you're using it on pure XML, but hopefully it's close enough to get you what you need. JC