Launch Browser in Incognito/Private Mode
Thought of sharing the code in the community for launching browsers in their incognito modes. The function is parameterized such a way to run for the browsers Internet Explorer, Edge, Chrome and Firefox. Hope it will be useful for more people. function runIncognitoMode(browserName){ //var browserName = "firefox" //iexplore,edge,chrome,firefox if (Sys.WaitBrowser(browserName).Exists){ var browser = Sys.Browser(browserName); Log.Enabled = false // To disable the warning that might occur during closing of the browser browser.Close(); Log.Enabled = true // enabling the logs back } if(browserName=="edge"){ Browsers.Item(btEdge).RunOptions = "-inprivate" Delay(3000) Browsers.Item(btEdge).Run(); }else if (browserName=="iexplore"){ Browsers.Item(btIExplorer).RunOptions = "-private" Delay(3000) Browsers.Item(btIExplorer).Run(); }else if (browserName=="chrome"){ Browsers.Item(btChrome).RunOptions = "-incognito" Delay(3000) Browsers.Item(btChrome).Run(); }else if (browserName=="firefox"){ Browsers.Item(btFirefox).RunOptions = "-private" Delay(3000) Browsers.Item(btFirefox).Run(); } Sys.Browser(browserName).BrowserWindow(0).Maximize() }3.8KViews8likes3CommentsPassword Variable not passing the password
Trying to pass a secure password through the aqHttpRequest using the encrypted variable type of password. And it seems to pass a generic name in the logs when I try to access it. If I hard code the password it works fine. Trying to pass the password in aqHttpRequest["SetHeader"]("authorization", "Bearer " + Project["variables"]["AccessToken"]); In both the web logs and the test complete logs it shows {RandomNumbers}TestProject2AccessToken. If I useaqHttpRequest["SetHeader"]("authorization", "Bearer " + "ActualPassword"); it will work fine.Solved1.6KViews0likes3CommentsCompare text property of two objects
Hello, I am having a simple issue trying to compare two text values in keyword test where one value is greater than other. I had used compare property checkpoint, and the comparision is not correct.(you can see it from the printscreen). After that i had tried to do it in script, same with compare property checkpoint and the result was the same as in the keyword test. Also i had tried to do with if then statement:if (raspSr > vkIznos) then Log.message('ok') else log.error('notok') where i had defined my two variables as a String( var raspSr: string; var vkIznos: string), but it doesnt help. I constantlly get the incorrect results for everything mention above. I am sending you the printscreen results, any help will be welcomed.Solved1.7KViews0likes4CommentsHow do I wait for a user to perform an action?
In a Script test, how do I prompt the user to perform some action, then continue the script after the user indicates the action is complete? For example, I need to interact with a CAPTCHA on a form, so I need to tell the user to satisfy the CAPTCHA then click on something to continue the automated test.Solved3.7KViews0likes9CommentsCan't import files in Python
I'm simply trying to use an import statement to import some constants in a python test script and its not working. the file I'm trying to import is in my project and in the same directory as the file that's trying to import it.I've looked through the specifics of usage for Python and even copied the file into <TestComplete>\Bin\Extensions\Python\Python34\Lib folder but still nothing. The specifics of usage also says you can"changethe sys_path variable explicitly and then import the module" but Sys doesn't even have a "path" property.Solved2.3KViews0likes2CommentsImprove TestComplete performance
Hi, We want to improve the performance of TestComplete. By switching from TC11 to TC12, we improved by 25% the overall time of execution ofour test suite (from nearly 10h to 7h15). But since mid December, we have lost 1h. Does anyone already had a such issue with TestComplete 12 ? Losing performance without any change ? In our way to improve perfomance, we want to switch from JScript to Javascript. All of our script are in JScript, does switching to Javascript will increasethe performance ? Most of our tests are Keywords Tests. Is it possible that converting these Keywords Tests to Scripts will improve performance too ? Thanks for your help.1.3KViews0likes1CommentTo get the object where Object Checkpoint was called from during OnLogCheckPoint Event?
I am currently working on detecting the test information automatically during the test run in test complete. So my requirement is this. I have a test created in testcomplete I attach the OnLogCheckpoint event having my own code. There I can get checkpoint properties for object checkpoints (they are available in the LogParams) Yet I could not find a way to get on which object the object checkpoint was called. Is there any way to get this object/alias on which the object checkpoint is executed from the script from the OnLogCheckpoint event or some other way. Thanks in advance for any suggestions500Views0likes0CommentsCalling Function in Specific Script File
I have a function with the same name in multiple script files. How do I specifically designate the intendedscript file? Intellisense doesn't show all script files. Must the function names be unique across all script files? I assumed each file would have it's own scope.Solved1.7KViews0likes4Comments