Contributions
TestComplete in built Files.Compare Method ReferenceError: Files is not defined
When i run the below script to compare 2 files based off the Files.Compare Method in the TestComplete documentation here,I get an error in the log, ReferenceError: Files is not defined. Problem is, it is intermittant so sometimes it will run sometimes it won't Can someone explain if i have done something wrong as Files is a built in method, so shouldn't need defining but i may have something wrong. function TestCompare() { var Design = "Edwardian_Design_1"; var DevSettingsText = "D:\\TestComplete\\Input\\Mobile\\" + ProjectSuite.Variables.application + "\\Test\\" + Design + "_DevSettingsText.txt"; var BaselineDevSettingsText = "D:\\TestComplete\\Input\\Mobile\\" + ProjectSuite.Variables.application + "\\Baseline\\" + Design + "_BaselineDevSettingsText.txt"; Log.Message("DevSettingsText = " + DevSettingsText); Log.Message("BaselineDevSettingsText = " + BaselineDevSettingsText); if (!Files.Compare(DevSettingsText, BaselineDevSettingsText)) Log.Warning("Developer Settings did not match baseline for " + Design); }321Views0likes1CommentRe: RegExp not selecting the FullName item I expected
Sorry i didn't get notified that this had had a response so my apologies for to responding back sooner. FullName attribute was Mobile.Device("Apple iPad 10.2\" 9th A2602 15.2").Process("uk.co.rpssoftware.designer.anglian").FindElementByAccessibilityId("Cornice\n") Although i have since resolved the issue by using the Name field406Views0likes0CommentsRe: RegExp not selecting the FullName item I expected
I was attepting to do something like was in the RegExp help page (https://support.smartbear.com/testcomplete/docs/reference/misc/regular-expressions.html) // Get Notepad's main window by using a regular expressio window = notepad.Find("WndCaption", "regexp:.* Notepad", 5); so i didn't have to put the entire FullName for every menu option. I've used the Name attribute in the end target = parentLevel.Find("Name", "StaticText\(\"" + Cornice + "\\n\"\)", 100); which works but doesn't explain why the regexp, like below didn't work target = parentLevel.Find("Name", "regexp:.*Cornice*", 100);563Views0likes0CommentsRegExp not selecting the FullName item I expected
I have a script, where i am trying to find and click a menu item, on a device in the BitBar cloud. Application is written in Flutter if any of that makes any difference. I have a RegExp part of my script that needs to target the Menu item 'Cornice' and touch it. Unfortunately on this menu as the Menu title name is also Cornice this confused my script so i switched to looking at the FullName attribute. The top Menu title FullName attribute is: Mobile.Device("Apple iPad 10.2\" 9th A2602 15.2").Process("uk.co.rpssoftware.designer.anglian").FindElementByAccessibilityId("Cornice") The Menu item, i want to touch, FullName attribute is: Mobile.Device("Apple iPad 10.2\" 9th A2602 15.2").Process("uk.co.rpssoftware.designer.anglian").FindElementByAccessibilityId("Cornice\n") So the difference is that the one i want to touch has '\n' at the end This is my adjusted code to get my issue across function RegExpDebug() { var menuName, parentLevel, searchPattern, target; propertySearch = "FullName"; menuName = "FindElementByAccessibilityId\(\"Cornice\\n\"\)"; searchPattern = "regexp:" + menuName + "*"; Log.Message("PropertySearch = " + propertySearch); Log.Message("MenuName = " + menuName); Log.Message("SearchPattern = " + searchPattern); parentLevel = Aliases.Device.process; Refresh_Appium_Content(); target = parentLevel.Find(propertySearch, searchPattern, 20000); Log.Message("target = " + target.FullName); if (target.exists) { target.Touch(); } } And this is the output from the logs. For some reason the target found and touched, is always the top menu option, rather than the menu item with FullName ending '\n'. Can anyone offer any advice.585Views1like4CommentsAllow the mouse wheel to zoom in and out of the application where applicable
Our mobile app generates a 3D render on the screen that you can rotate on the various axis and zoom in and out. Currently on iPad devices I have no way of zooming out to view a design, if too big to fit on the screen, or zoom in, to look inside a design. I believe some of the other devices have, or had, some additional input options i.e. 2 finger pinch options but this hasn't been rolled out across all devices. A zoom functionality that is tied to the mouse wheel would be a nice option692Views1like0CommentsRe: Mobile Screen in TestExecute
Hi Tanya, I was going to ask the same question when i saw this response. We have recently moved to an additional TE license for running the mobile device testing as was previously using the TC license. I always found it handy to view the mobile device screen on a monitor as the devices and machine where locked in a cabinet with the monitor exteranl to the cabinet, so i could view the progress without having to have the cabinet unlocked and open. Obviously i have lost this capability moving to TE. Does this have a priorityor even an idea of if it will be implemented as i'm aware this thread is quite old?1.7KViews0likes0CommentsParametrise xmlcheckpoint name
Hi all, I am looking to try and parameterise a function to check the xml generated against the baseline saved in TC. i have simplified the code below, but my question is can i parameterise the actual checkpoint name, i.e. 'XML.XmlCheckpoint1' in the below? I can parameterise the actual xml source but i want to use this function multiple times in a loop, so want it to select the correct xml file from the Stores XML.XmlCheckpoint1.Check(param1); procedure XML_Compare; var param1; param2; begin param1 := 'C:\\Work\\Data.xml'; param2 := Project.Variables.Driver.value('XMLCheckpointName'); XML.XmlCheckpoint1.Check(param1); end;Solved1.1KViews0likes2CommentsRe: Menu not selected as TC reports as not visible on screen, but i'm looking right at it.
Hi Linda 95. The item in question is always visible on screen and doesn't need to be scrolled on the ipad in question. I am lucky enough to have 3 monitors on my main machine, so i use 1 specifically for running tests to avoid the possibility of an over lapping window from another application. It could just be down to the fact that as you mention it had a side affect using visible on screen against a mobile device. Could be due to a lag with the TC Mobile Screen viewer as i'm not sure if TC is using that to view items or actually running on the device itself.2.8KViews0likes0CommentsRe: Menu not selected as TC reports as not visible on screen, but i'm looking right at it.
Thank you both and apologies for the late feedback. I have a feeling that it is some sort of delay in the screen displaying what it is looking for although i am not sure why it is only affecting that particular menu item, since they all run the same code, just with a different param to tell it what text to search for. I have increased my delays in the script and it appears to now be fine for 15 out of 16 loops. Thank you both for the input as it gave me other avenues to look at.2.9KViews2likes2Comments