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.7KViews7likes3CommentsFind by text in ListView Android Mobile
Hi, I can't find in the listview the item by ControlText on the layout which is in the list. Object path: Aliases.Device.Process_androidclient.Layout_NO_ID.Layout_action_bar_root.Layout_content.Layout_vmc_main_content_area.ListView_vmc_screen30_list. Layout("NO_ID").Layout("NO_ID").Layout("vmc_list_row_other_lines").Layout("NO_ID", 2).Layout("NO_ID").TextView("vmc_list_row_sub_column_value") Layout("NO_ID", 2) - number 2 is second item (layout) in list. And controltext is in TextView on Layout.... (picture) Thank you for your advice 🙂1.9KViews0likes9CommentsUsing Text Recognition Technology with Qt objects
Hello, I am trying to use the text recognition technology "Using Text Recognition Technology" (link below) https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/text-recognition/a.bout.html However, in the above link, see under "Enabling Text Recognition for Your Application" > point#5. It says "It must be the class name returned by the WndClass property of the object, to which your window or control corresponds.". Does this mean that it will not work for Qt objects? The desktop application that I am testing is Qt based. Therefore when I select a window/dialog using object spy, it returns 'QtClassName' and not a 'WndClass'. Therefore, when I try to invoke the 'TextObject' method, it does not work. Is there still a way that I can use this feature in my case? From object spy: Full Name = Sys.Process("myApp").QtObject("MainFrame").QtObject("TopWidget").......QtObject("TreeView").QtObject("qt_scrollarea_viewport") Thanks!Solved1.1KViews0likes2CommentsBatch script not running through TestComplete
I want to run a batch script in one of my tests that deletes some records from a db. I have the following function: function deleteReports() { Sys.OleObject("WScript.Shell").Exec("cmd /c C:\Users\nnr6cbq\Desktop\Delete_Dashboard_Reports.bat"); } When I execute the function, it seems to very quickly open a cmd prompt but then stops and the test shows as passed. However, the script was not actually executed. When I run the script manually, it works as intended. What am I missing?Solved1.1KViews0likes2CommentsWhat does the "True" parameter for running an executable from a script mean?
I am fairly new to TestComplete (about 3-4 months) and I've noticed that when I record scripts where I am running an executable, it will create a line like TestedApps.ProgramName.Run(1, True) I firgured out that the "1" was for the instance of the program, so you can run more than one instance. I haven't been able to find out what the "True" denotes. Can anyone tell me what this is? Thanks in advance.Solved919Views0likes2CommentsHow to use a project variables in a VB script unit
Hi all, I have come across a problem, that I cannot fathom. I have 4 values I will be using across a suite of tests I am defining. I have created persistent project variables to store these values (LAA = Local Admin account) I am launching a CMD prompt using the local administrator account, because using certain WMIC commands require to be executed as the local admin account, e.g. WMIC USERACCOUNT. I know the LAAPassword project variable is typed as a string in the screenshot, but this is irrelevant because I have the exact same failure when the LAAPassword variable is typed as a password The following VB script fails to launch a batch file, and errors with 'Unable to run "GenLAAProps_app" under the domain\account name" If I define the variables within the VB script, e.g. LAAName = "CantGuessMe", etc. then the script works. Because of the way we do security, different Windows installations have different local admin names and passwords, which I wish to feed-in via a datasource, hence the reason for using project variables - this input will be developed once I can get the project variables to work. I've also tried assigning the project variables to local variables defined within the VB script, but no luck. It's probably something very simple I've missed out, but I can't find it. Any help would be welcomed. Cheers, Simon1.3KViews0likes4CommentsTestComplete AzureDevops Integration
Hi, I'm trying to integrate TestComplete with AzureDevops to run my test cases on the AzureDevops pipeline. I have watched the training video on smart bear website but that video is not well explained and it is outdated. Please, someone, share a step-by-step guideline on the new AzureDevops version.Solved1.4KViews0likes5CommentsHow do we save a folder from testcomplete log file through script
I have multiple folders created in my Results Log Folder and I want to export the each particular folder separately into a a different paths. Can we do this through VB script? Do we have any methods to try this approach? I have attached an example screenshot of how the result file will look. As per the example I would like to export Folder0 separately into a different path. Samething for Folder 1 & Folder2.3.2KViews0likes10CommentsTestComplete- Export Keyword Test Project Scripts
Is it possible to export your keyword test projects to scripts or some other format to change test automation software? After two years of writing keyword tests in TestComplete, we've decided to change to a different test automation tool such as Cypress, Web Driver, or Selenium that will work better with our web app. We do not want to lose all of our current tests if we can export to javascript or some other format. We would need our projects, name mapping information, existing scripts, and project variables. I'm not looking to export the logs or results from the tests but the tests themselves. Thanks1.1KViews0likes3Comments