ContributionsMost RecentMost LikesSolutionsSE Tip : Drag-and-drop one object to another Hi all, A common challenge in automation is achieving precise drag-and-drop actions, especially when dealing with dynamic or responsive user interfaces. This question comes up regularly in different ways - how do I refine the drag-and-drop action in TestComplete? TestComplete's built-in Drag action is designed to drag a specific Alias object from a given point to another point, but at a pixel offset (i.e. drag Alias....Button by X/Y pixels). While useful as a "jumping off point", this approach can be problematic for obvious reasons (Dynamic UIs, changing screen resolutions, inconsistent offsets) leading to brittle tests. Fortunately, TestComplete method parameters offer a high degree of customisation. By evaluating and utilising exposed properties like ScreenTop/ScreenLeft, we can create more robust and adaptable drag-and-drop actions. This allows us to instead dynamically reference the coordinates of a target object, or better still use exposed values in simple calculations, like figuring out the offset value for the Drag action. This Python script example calculates the offset using the commonScreenTop and ScreenLeft positions of both objects then passes the difference to the Drag action, allowing us to drag one given object to another given object with much more flexibility : def dragToObject(clientObj, targetObj): # Using ScreenLeft property to drag horizontally; ScreenTop for vertical fromObjectTop = aqObject.GetPropertyValue(clientObj, "ScreenTop") fromObjectLeft = aqObject.GetPropertyValue(clientObj, "ScreenLeft") toObjectTop = aqObject.GetPropertyValue(targetObj, "ScreenTop") toObjectLeft = aqObject.GetPropertyValue(targetObj, "ScreenLeft") dragY = toObjectTop-fromObjectTop dragX = toObjectLeft-fromObjectLeft Log.Message("Dragging "+aqConvert.IntToStr(dragX)+"px horizontally and"+aqConvert.IntToStr(dragY)+"px vertically") clientObj.Drag(-1, -1, dragX, dragY) You can then even utilise this in your KeywordTests, by changing the input parameter Mode to Onscreen Object, which enables the Object Picker : Now you have a way to drag one object to another - for example a value into a table? Hope this gets the creative juices going - can you think of other ways you might handle dynamic values in other Action methods? Regards, Mike TestComplete Solutions Engineer Re: Change words in old posts KnulliasMarsha_R says you should be able to edit/delete your old posts using the context menu Do you not have this option? DM me the details if you face an issue and ill see what we can do Re: Unable to connect to mobile devices on TestComplete via Bitbar Hi This error means you do not have a licence for automated testing. Reach out to your account rep to get a trial, or use the trial form at the BitBar homepage. Thanks Re: Mobile Web Tests with Safari browser Hisimonaferrara The general concept is that you would create TestComplete web tests locally on your Windows machine in whatever browser you wish, then run that same test on another browser using BitBar. There is no requirement for you to have a Mac or access to Safari as BitBar provides that capability. Take a look at this short video for a working example of exactly this scenario :https://smartbear.wistia.com/medias/5odeoa03kv Re: Object spy issue for a desktop application You can perform testing in VDI's, but TestComplete must be installed and accessed on the same machine as the application under test so it may access all application internals. Regards the Object Tree differences, it is impossible to comment without seeing at least a screenshot of the two instances. Re: Object spy issue for a desktop application Hiabishekhari007 I would check the scaling settings for the application under test and TestComplete are set to "Application". You can find this by right-clicking on each app launcher icon, click on Compatibility tab then "High DPI Settings". Make sure the High DPI scaling is set to Application. If this still does not work, I suggest sending a support ticket which, if an issue is found, can be escalated to the dev team to investigate. https://support.smartbear.com/testcomplete/message/ Thanks Re: Click doesn't work on Chrome popup Hiddima What version of TestComplete are you using? The latest version should be able to handle this JS alert. If not, you can try using an image-based action or an OCR action to handle it. Re: Real mobile devices Hiḥari- BitBar does not connect to Selenium Grid - BitBar is its own Grid/Device Cloud. TestComplete connects to BitBar to run tests on the BitBar device cloud. You can review this method to connect to another provider/Grid : If you use any other Selenium Grid provider Re: Real mobile devices No, this information pertains to running TestComplete tests on BitBar. To run your Selenium scripts on BitBar, you don't need TestComplete, you can generate the required capabilities in the BitBar UI and connect to the remote webdriver directly. See here : BitBar : Automated Testing Re: Real mobile devices Hiḥari No, that applies to native mobile apps only. To run Web tests on a mobile browser in BitBar, you would use either the Run Remote Browser operation or configure parallel device cloud environments in the Execution Plan. Take a look at the two videos on this page for a quick demonstration of running Web tests on BitBar mobile browsers : Cross-Platform Web Tests