Click method not accepted in chrome
I am trying toclick buttons (accept icon, delete icon, etc., ) whichare childelements of a grid cell butis notidentified by object browser. However, I found access to them by using Xpath expression and passing Click command on them. This works fine on IE but throws exception on chrome (This method doesnt support the method or property). My code is something like this: Set grid = page.Find("className","k-widget k-grid*",1000) Set cell = grid.Find(Array("RowIndex","ColumnIndex"),Array("0","3"),1000) Set acceptbtn = cell.FindChildByXPath("//SPAN[@class='command icon-accept-inv']") ' OR Set acceptbtn = cell.FindChildByXPath("//SPAN[@onclick='inlineGridEditor.saveItem(0)']") Call acceptbtn.Click html is something like this: <td role="gridcell"> <span class="command icon-accept-inv" onclick="inlineGridEditor.saveItem(0)"></span> <span class="command icon-cancel-inv" onclick="inlineGridEditor.cancelEditItem(0)"></span> </span> <span data-edit-off="" class="command icon-edit-inv" onclick="inlineGridEditor.editItem(0)" style="display: none;"></span><span data-delete="" class="command icon-del-inv" onclick="inlineGridEditor.deleteItem(0,"", urls.DeleteCallCategory)" style="display: none;"></span></td> The button element is identified both in chrome and IE with the above script but Click action works only on IE. ThanksSolved5.8KViews0likes11CommentsTrying to get Hex/RGB value of a color preview swatch, please help!
Hi everyone In configuration page some colors are customizable. When clicked on any of theinput fields, a color chooser pops up. Selecting a color populates the field with the hex value. The preview swatch updates to the selected color. I am trying to access the hex value of the preview color. After some reading, this is what I came up with: (I have noticed that swatch value shows up as Hex in Chrome but as RGB in IE!) var colorPrimary = page.QuerySelector(".evo-colorind"); var style = page.contentDocument.defaultView.getComputedStyle(colorPrimary, ""); Log.Message(style.background-color); I am gettingJavaScript runtime error0x80020101 at 'style' var. Any help deeply appreciated.Solved5.4KViews0likes17CommentsGetting Error: Unable to navigate to the URL/page while launching tests
I am unable to execute my tests when launched through a Jenkins job. Please find the environment details below: TestComplete (Server): 14.81.217.7 x64 TestExecute (VM): 14.81.217.11 Chrome Version (Server): 91.0.4472.77 Chrome Version (VM): 91.0.4472.77 License Details: TestComplete 14: node-locked TestExecute 14: floating, 1 seat Job Details: Run interactive user session is turned ON and running a specific project suite. Node Details: Launch method: Launch agent by connecting it to the master Internal data directory: remoting Scenario 1: Launch the VM through RDP session from the server machine and run the Jenkins job by keeping the VM session active then my tests will run. I can see the tests running through TestComplete chrome plugin. Scenario 2: Disconnect the VM and then run the jenkins job, after few minutes jenkins job will be marked as failure and I see following logs: ========================== Started by user admin Running as SYSTEM Building remotely on DESKTOP-73F1U9C in workspace C:\jenkins\agent\workspace\test [TestComplete] The test execution started (Packnet/Packnet). [TestComplete] Found TestComplete/TestExecute installations: Type: TE, Version: 14.81.217.11, Path: "C:\Program Files (x86)\SmartBear\TestExecute 14\x64\bin\TestExecute.exe" Type: TELite, Version: 14.81.217.50, Path: "C:\Program Files (x86)\SmartBear\TestExecuteLite 14\x64\bin\TestExecuteLite.exe" [TestComplete] Selected TestComplete/TestExecute installation: Type: TE, Version: 14.81.217.11, Path: "C:\Program Files (x86)\SmartBear\TestExecute 14\x64\bin\TestExecute.exe" [TestComplete] [WARNING] The node is connected via Java Web Start (JNLP). In this mode, the "Run interactive user session" property of the TestComplete Test step is ignored. TestComplete (or TestExecute) will work in the current user session. [TestComplete] Launching the test runner. $ '"C:\Program Files (x86)\SmartBear\TestExecute 14\x64\bin\SessionCreator.exe"' ExecuteProcess '/c:""C:\Program Files (x86)\SmartBear\TestExecute 14\x64\bin\TestExecute.exe"" "C:\PackNet_Automation_POC\Packnet.pjs" /run /SilentMode /ForceConversion /ns /exit "/ExportLog:C:\jenkins\agent\workspace\test\1622818571792.tclogx" "/ExportLog:C:\jenkins\agent\workspace\test\1622818571792.htmlx" "/ErrorLog:C:\jenkins\agent\workspace\test\1622818571792.txt" "/ExportLog:C:\jenkins\agent\workspace\test\1622818571792.mht" "/project:Packnet" /DoNotShowLog /JenkinsTCPluginVersion:2.6.2' [TestComplete] Test runner exit code: 2. [TestComplete] [WARNING] Error: Unable to navigate to the http://localhost/packnet/#/Login page.. [TestComplete] [WARNING] Errors occurred during the test execution. [TestComplete] Marking the build as UNSTABLE. [TestComplete] The test execution finished (Packnet/Packnet). Build step 'TestComplete Test' changed build result to UNSTABLE Finished: UNSTABLE ========================== I have manually launched the Jenkins agent through jnlp file and kept the console open to run my tests. Appreciate your response on this. Thanks! PhaniSolved5KViews0likes8CommentsError: This operation returned because the timeout period expired in testcomplete
I got an error like below Error: This operation returned because the timeout period expired in testcomplete I increase the auto wait timeout to 50000, but still I get the same, how do it rectify it?Solved4.7KViews0likes4CommentsIs Testcomplete compatible with Angular Material?
I have this html , taken fromhttps://material.angular.io/components/select/overview To see the rendering of the code below go tohttps://stackblitz.com/angular/vvqbegyprlm?file=package.json <form> <h4>mat-select</h4> <mat-form-field> <mat-select placeholder="Favorite food" [(ngModel)]="selectedValue" name="food" role="SELECT"> <mat-option *ngFor="let food of foods" [value]="food.value"> {{food.viewValue}} </mat-option> </mat-select> </mat-form-field> <p> Selected food: {{selectedValue}} </p> <h4>native html select</h4> <mat-form-field> <select matNativeControl placeholder="Favorite car" [(ngModel)]="selectedCar" name="car"> <option value="" selected></option> <option *ngFor="let car of cars" [value]="car.value"> {{car.viewValue}} </option> </select> </mat-form-field> <p> Selected car: {{selectedCar}} </p> </form> when I spy this object it finds all the panels for the <div class...> objects but doesnt recognize the <mat-select class...> but it correctly identifiesnative html select <select> with wSelectedItem property . Does Testcomplete not support custom html tags? Or is it somehow possible to add those custom html tags to the object spy4.1KViews0likes5CommentsHow to grab the message in browser console (Chrome Developer Tools)
Hi, I am wondering how can we write a Script in Javascript to grab the message in Browser Console. So e.g. when trying to login to a webpage and login fails, the console will return some error message like this I would like to grab that line and put it in my txt log file. Is there any method to do that? Thank You.3.8KViews0likes5CommentsLaunch 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.7KViews8likes3CommentsWait for Xpath
Hi, I am using test complete for web testing and preferred XPATH to find elements. But I couldnt find a proper wait statement for xpath other than hard coded wait statements. My scripts are failing due to this and sometimes the inbuilt methods like click(), exists etc are also getting failed. Please find a sample script below. The language used is Python def waitelement_click(): page = Sys.Browser("chrome").Page("xyz.com") viewcombtn = page.FindChildByXPath("//span[text()='View Comments']") select_lst = page.FindChildByXPath("//span[@class='selected']") selrange = page.FindChildByXPath("//span[text()='Year to Date']") firstissue = page.FindChildByXPath("//div[@class='mdc-layout-grid action-bar list-bar ng-star-inserted'][1]//span[@class='blue']") creator = page.FindChildByXPath("//div[@class='mdc-layout-grid action-bar list-bar ng-star-inserted'][1]//span[5]") addcmtbtn = page.FindChildByXPath("//span[@class='val add-comment ng-star-inserted']")# popup = pop_parent.WaitChild('''Panel("cdk_overlay_55")''',5000) viewcombbtn.Click() select_lst.Click() selrange.Click() Log.Message(creator.contentText) firstissue.Click() addcmtbtn.Click() The failures are mainly in between clicking different buttons.. Please give me a solution.Solved3.5KViews0likes8CommentsIssue with Chrome and ClickItem
Hello, i have a problem with aselect combo boxand the method ClickItem() in Chrome. Here is an example (converted from keyword test to script): function SelectFromDropDown_Chrome() { //Opens the specified URL in a running instance of the specified browser. Browsers.Item(btChrome).Navigate("https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_select"); //Selects the 'Audi' item of the 'select' combo box. Aliases.browser.pageWwwW3schoolsComTagsTryitAspF.frameIframeresult.select.ClickItem("Audi"); //Checks whether the 'wText' property of the Aliases.browser.pageWwwW3schoolsComTagsTryitAspF.frameIframeresult.select object equals 'Audi'. aqObject.CheckProperty(Aliases.browser.pageWwwW3schoolsComTagsTryitAspF.frameIframeresult.select, "wText", cmpEqual, "Audi"); } At the end Chrome select "Opel" and not the given text "Audi". This strange behavior only exists in Chrome. In the others browsers (Firefox, Internet Explorer, Edge) the keyword test or script works. Can anyone help me with this problem? Regards Thomas3.3KViews0likes8Comments