Contributions
Re: Does TestComplete work correctly with React javascript v0.13
Alex, Thanks for the reply. I understand most of what you posted and also understand most ofwhat Lino posted on the other page. Could you provide an example of these: " -- Because of the fact that dynamic pages not necessarily reload the page: wait until either the target object or one of its parents appears; -- If you was waiting for some parent object, search for the target object using (dynamic) set of unique properties;" Currently, I just add in delays in my scripts right now ( using vbscript ) to wait for items to show up on the page: Call aqUtils.Delay 5000 'wait for 5 seconds Occasionally, Imay alsodo a page wait also: Call page.wait() 'wait for page to load How can I check if the target object or its parent appears? Is it like this: if ( aliases.browser.page1.item1.exists )then 'do something here or is it using a "findChild" method? I am not sure how to use findChild to check if something appears on the page ================ I don't know what it means to "search for the target object using (dynamic) set of unique properties". Could you provide an example of this? Thanks, Tim2.7KViews0likes1Comment- 1.1KViews0likes0Comments
Re: Does TestComplete work correctly with React javascript v0.13
I was actually able to create a quick script that navigates to this web page withexample React code on it, clicks the "Result" link under #2 on this page and finally checksthe text on the "Home" button. Everything worked as expected. Sometimes in the past, with dynamic pages, Test Complete could not find the item on the page. But, this script below seemed to cause no issues on this React web page. sub test1 Sys.Browser("iexplore").ToUrl("http://tutorialzine.com/2014/07/5-practical-examples-for-learning-facebooks-react-framework/") aqUtils.Delay 5000 Call Aliases.browser.page5PracticalExamplesForLearnin.sectionContent.articlePost.frameHttpJsfiddleNetDannymarkovV.panelWrapper.header.linkResult.Click() aqUtils.Delay 5000 Call aqObject.CheckProperty(Aliases.browser.page5PracticalExamplesForLearnin.sectionContent.articlePost.frameHttpJsfiddleNetDannymarkovV.frameFiddleJshellNetDannymarkovV.panel.textnodeHome, "contentText", cmpContains, "Home", False) end sub2.7KViews0likes4CommentsRe: Double quotes added to variables
I figured out the problem. The variables were global in script #1. I passed them into script #2 from script #1. In script #2, I had to make valid json for a "POST" command like so: postData = "{""username"": " & username & ", ""password"": " & password & "}" This is valid json. I checked it using json lint: http://jsonlint.com/ However, the strange thing here is that when I leave script #2, those double quotes follow the variable. So, username first equals "user@domain.com" in script #1. When execution focus of the project returns from script #2, back into script #1, username still equals ""user@domain.com""!!! I solved this by doing the following at the end of script #2, right before focus returns back to script #1: username = aqString.unquote(username) So, now, in script #1, I will not have extra double quotes anymore. But, the bigger question is why did the double quotes follow the variable from script #2 back into script #1. I thought the scope of the variable would have died in script #2? So, this is pass by reference the whole time then?3KViews0likes0CommentsDouble quotes added to variables
At times, double quotes seem to be added to string variables in Test Complete. This may be a vbscript issue, I am not sure. However, I have seen that a variable could end up having its value change like this: "data" ""data"" """data""" The more I keep using it, the more double quotes get added to the value of the variable. To bypass, I actually started creating copies of the variable since the value was not going to change anyways like so: Dim data1 Dim data2 Dim data3 data1 = "blah" data2 = "blah" data3 = "blah" This is very wasteful, I know. But, I can not figure out why these so called phantom double quotes keep injecting themselves into my code. Any ideas? Thanks in advance!Solved3.1KViews0likes2Commentsclick check box find by span
I need to click a check box on the web ui in my automation project using Test Complete. I was able to map the all of the check boxes on the page correctly in Name Mapping. But, when the script runs, Test Complete can no longer find any of the check boxes. One thing I found interesting was that the check box I wanted had a property of being in row "1" instead of row "0" when I did an edit in Test Complete to try and change some of the properties Test Complete had found in the Name Mapping. I believe this is occurring because there are 2 buttons on the page that toggle a view back and forth without refreshing the whole page. Also, there are check boxes that show up for different items depending on which of those 2 buttons was selected by the user. So, I am guessing that those check boxes are part of an array, but only 1 out of the 2 sets of them show up at any one time based upon which button was selected at the top of the page by the user. I believe this is what is giving Test Complete some problems as it can not find the check boxes upon execution of the script. I know that was a lot of detail, but hopefully I have been clear enough without writing a book. Anyways, a colleague suggested I do a find by child or by xpath. I have tried the below: Here is my code snippet: Dim object_x object_x = Aliases.browser.pageEnroll.EvaluateXPath("//[@id='my_table']/tbody/tr/td[1]/span[starts-with(@class, 'glyph glyphs row')]/@class") object_x(0).Click ---------------- But, Test Complete throws an error on the "click" line saying: "Microsoft VBScript runtime error. Type mismatch: 'object-x'"..... ---------------- I gathered the xpath by doing the following. I did an inspect element on the check box in Google Chrome. Here was the xpath I copied from developer tools in Chrome: //*[@id="my_table"]/tbody/tr/td[1]/span Next, I copied the xpath in Chrome and pasted it into my script. I had to change the double quotes to single quotes and remove the leading "*" before "[@id" as I did not think the "*" was needed ( although maybe I am wrong? ). I know also that I can do a check to see if the item exists as I found that on one of the other pages while searching. But, that should not help me here as if the item exists, the click should just work. The item also should exist on the page, so that should not be the issue. I believe one of a few things to be my problem. But, I do not know how to fix them if they are the problem: 1. Am I incorrectly referring to "Aliases.browser.pageEnroll" instead of something like "page"? 2. Is my xpath incorrect as far as Test Complete is concerned? 3. Is "[starts-with" still even used. I found this from Test Complete 8.5 which is many versions ago. Maybe this is deprecated now? 4. I am not using my variable in a legal way. Maybe what gets returned from EvaluateXPath is not something in which I can put ".Click" at the end of it? Maybe its a different object type or data type? How can I tell what is being returned? Can I attach ".Click" to the end of my variable "object_x"? Useful pages so far: https://support.smartbear.com/viewarticle/71392/ http://community.smartbear.com/t5/Functional-Web-Testing/SPAN-tag-without-text/td-p/56203 http://support.smartbear.com/viewarticle/70020/#_ga=1.125109898.1868987023.14413913241KViews0likes0Commentsmodal takes control of web site until
My script executes to a point where a modal is displayed and will not let the user advance until a check box is pressed. Everything behind the modal is visibly faded and unselectable. There is a check box, 1 enabled button, and 1 disabled button ( until the check box is selected ). Test Complete can not see any text in the modal, the check box of the buttons. I have them mapped properly in Name Mapping, so I am not sure why Test Complete can not see these items. I have tried many various things suggested on this site and others, but none have worked so far. Any ideas? By the way, this also would be a nice enhancement to be able to map the items and select something that indicated these items would be displayed in a modal. This would let Test Complete know that the normal flow of the web site was being interrupted by a modal that takes over control of the web ui until some action is done.925Views0likes1CommentMicrosoft team foundation server MSSCCI Provider SCC API cannot be used with Test Complete
I received the following error after installing Visual Studio 2010 w/ SP 1 and both Team Foundation Server 2010 and Team Foundation Server 2008. I am running Windows 10 now. I am still using Test Complete 10.6 right now until we work out a few things with Test Complete 11. How can I fix this error in Test Complete?1.3KViews0likes0Comments