Contributions
Object Browser intermittently not showing all elements of a page
I've tried to refresh, and it just doesn't work. The image describes what the problem is -- Each field should correspond to a panel - when this is working I have a Panel(0) through Panel(6), but when it intermittently fails, It never sees panels 3, 4, 5, or 6. It has never failed in any other manner other than missing those 4 panels. Refreshing the object browser manually, or in code makes no difference. Why? Some additional info: - The parent item has a ChildCount of 3 when it fails (7 when it's working), which could explain that, but.. why would it? - When I use object browser to attempt to hover over these fields, it goes nuts, and starts highlighting other things, and eventually highlights the whole browser. - Browser is Firefox 11 with TC 8.70 + FF11 patch installed. - When it IS working, the object browser sorts them in a weird order - it puts them in order of 3, 4, 5, 6, 1, 2, 0 - every time.18KViews0likes1CommentHelp with advanced namemapping
I have a test that I have to run on multiple environments whos URL changes often. I can't figure out how to easily add or remove urls for each namemapped page. For example, I might have one like this: NameMapping.Sys.WebBrowser.pageHome Property: ObjectType = Page AND Property: URL = "https://*home*.website.com/agent*/download However, this URL could change to "https://*-web.env*.sys*.net/agent*/download" even though I want the same namemapping tree for both pages. The domain is the only thing that changes -- in my case, /agent*/download will always be there. I know I can do this via conditional namemapping, but I'd rather not add lots of different strings. I wanted to just create a variable where in my script I can set the appropriate format during runtime, but namemapping doesn't seem to support both variables and text for a namemapping value. I just want to be able to do something like Project.Variables.NameMappedHome & "/agent*/download" Is there an easier way I can do this besides namemapping all of these things?18KViews0likes1Comment- 1.5KViews0likes0Comments
TC Isn't recognizing object correctly
I'm having a heck of a time with a control on our webpage being recognized properly by TC. Here is the issue - if I map the control (It's just a link) to namemapping and on the "Map Object" window, click Highlight, it highlights it without issue. If I click OK, and then right-click and highlight the control through namemapping, it says"The underlying object doesn't exist". If I try to re-map it it won't let me because it says it already exists. This is driving me crazy, since I can't seem to get around this. Please assist. See screenshot14KViews0likes3Comments- 1.6KViews0likes0Comments
Re: incrementing test parameter
Why not just create a project variable? i.e. If Not Project.Variables.VariableExists("Increment") then Project.Variables.AddVariable "Increment", "Integer" If Not Project.Variables.VariableExists("Client") then Project.Variables.AddVariable "Client", "String" i = Project.Variables.Increment i = i + 1 Project.Variables.Increment = i Project.Variables.Client = "Client" & aqConvert.IntToStr(Project.Variables.Increment) Something along those lines (Apologies for sloppy code but you get the idea) On a side note, this is what I do for my new accounts, and keep them random: Sub unamegen(id, pass) a = DateDiff("s", "01/01/1970 00:00:00", Now()) If id <> "" Then Project.Variables.sdUserName = id & "_" & a & "@xxxxthisisafakeemailxxxx.com" Else Project.Variables.sdUserName = "epoch_" & a & "@xxxxthisisafakeemailxxxx.com" End If If pass <> "" Then Project.Variables.sdPassword = pass Else Project.Variables.sdPassword = "password" End If Log.Message "===" Log.Message "Username for this test iteration is " & Project.Variables.sdUserName Log.Message "===" End Sub It has the added bonus of being a timestamp of your user account too.1.6KViews0likes0CommentsAm I using Sys.WaitProcess correctly?
I have this code: Log.Message "CLIENT.EXE Running: " & Sys.WaitProcess("Client.EXE", 2000).Exists Log.Message "AGENT.EXE Running: " & Sys.WaitProcess("Agent.EXE", 2000).Exists Both client.exe and agent.exe are running and in task manager when this code is executed. But in the log, it shows: CLIENT.EXE Running: False AGENT.EXE Running: False What gives?16KViews0likes2CommentsHow can I get TC to get a destination property of a link handled by javascript?
We have a link on a webpage that will dynamically change between Mac and Windows, depending on what is detected. The HTML code for this link is here: <div id="download_but"> <div class="button_large_download" onclick="download_clicked('windows', false, '');"><a href='#'>Download for Windows</a><span></span></div> </div> And for download_clicked, it shows: if (platform == 'mac') { window.location = 'https://192.168.0.1/download/mac.pkg'; } if (platform == 'linux') { window.location = 'http://192.168.0.1/products/latest.bin'; } if (platform == 'windows') { window.location = 'https://192.168.0.1/download/win.exe'; } In TC I'm unable to pull this location out of this button. I'm wondering if there is a way to? In other words - I want a way to find out where clicking this button is ultimately going to take me, which in the windows case should be https://192.168.0.1/download/win.exe Thanks :)17KViews0likes1Comment