Contributions
Re: Html 5 custom data attribute on Firefox
Hi, If I got it right, you are trying to inspect custom attributes of some SPAN element accessed via parentElement property of its child. The reason you can't see those attributes is that the property returns a native browser object instead of TestComplete extended object. Native browser objects return "raw" attributes and dataset collections, those collections do not list attribute names as properties (see NamedNodeMap and DOMStringMap). For that purpose you need to use TestComplete-specific Parent property instead of the native parentElement (the reason you can successfully use parentElement in Google Chrome is, in fact, an undocumented trait of TestComplete implementation of Chrome support). Another important thing is that, most likely, you are using parentElement instead of Parent because your SPAN element is not included in TestComplete object tree and, thus, not accessible via Parent. If so, you can either try not to use the SPAN in your tests/NameMapping at all, or, make this SPAN appear in the object tree by adding text content or role attribute to the SPAN (see Web Elements Included in and Excluded From the Tree Model). Hope this helps.2.9KViews3likes2CommentsRe: ReadyAPI test is failing while running from TestComplete
Hello! The recent release of ReadyAPI 2.3 contains several changes that broke the integration with TestComplete. Specifically, ReadyAPI tests are still running correctly, but TestComplete misinterprets their results as failures. The issue is already fixed in the upcoming TestComplete 12.50 release (should happen within the next couple of weeks). If the issue is critical, you can either request a patch for the current version of TC from our support, or revert ReadyAPI to the previous release. Sorry for the inconvenience.2KViews1like0CommentsRe: aqEnvironment.SetKeyboardLayout always return false
Hello! gabrielg The Locale parameter (despite its name) specifies the identifier of the layout to be set (as correctly stated in the help topic SetKeyboardLayout Method). The identifier is string of 8 characters composed of the hexadecimal values of language and device identifiers ("00000409" for US English). However the help topic example is not correct and uses only hex value of language id as Locale parameter thus failing the function. We should definitely correct this sample =) Also note that keyboard layout has no impact on the Keys method as it uses virtual keys for input. So you don't need to change the layout to input different language characters with Keys. baxatob It is strange that SetKeyboardLayout with "00000409" as Locale did not work for you as it did for me. Also according to the screenshot provided lang = 0x0426 was used as Locale. Also please make sure that the language is supported (using IsLanguageSupported) and the device identifier (first four characters of the layout identifier string) corresponds to the layout installed in your system. If it still does not work for you please open a support ticket regarding the issue with more detailed information - we will try our best to reproduce and fix this. Hope this helps.1.3KViews1like0CommentsRe: Dropdown list wont support ClickItem etc
Hi, william_roe wrote: mspatel wrote: Does anyone else have same issue ? The only "work around" I've been able to find is to input the value directly into the the dropdownlist. I'm not sure your dropdownlist supports this. We are using DevExpress 15.2 contols. Are you using ASP.NET or DevExtreme controls? In first case it should be supported Developer Express ASPxComboBox Support. If it is DevExtreme you can vote for it to be supported here TestComplete Control Support Survey1.8KViews0likes1CommentRe: Dropdown list wont support ClickItem etc
Hi, ________________________________________ mspatel wrote: I am convinced there is some issue with support of this kind of controls ( Kindo/Telerik) . ________________________________________ If I get it right, your combobox is http://demos.telerik.com/kendo-ui/dropdownlist. There is no special support for these controls at the moment so you have to use native web support to work with it. You can also vote for these controls to be supported via our special survey TestComplete Control Support Survey. The complete list of supported controls is here Supported Controls. ________________________________________ mspatel wrote: Using Recording to see Events doesnt help because when i tried on these controls , Its Clicking based on Coordinate e.g Click (12,130) etc. I dont think scripting based on Coordinates is portable. ________________________________________ It is totally fine since the Click (12,130) is recorded for the desired item and the coordinates are actually relative to the item rectangle so the click will never miss. You can actually remove the coordinates since it does not matter which part of the item will be clicked. ________________________________________ mspatel wrote: And as i replied to Tanya , problem is with Dropdown with Scroll bar. Let me know if you have solution. And No, Scrolling using script wont help because it changes parents object Identification ( which is panel ) and TC cant find that panel . ________________________________________ Scrolling inside the panel normally should not have any impact on the identification of the panel itself and its parents. TC cant find the panel Panel("MVCalcFormulaID_list") because the identification of its parent page.Panel(0) is ambigious. Before you click the control and its drop-down appears Panel(0) is some random panel and after the click it should become the right panel with Panel("MVCalcFormulaID_list") inside. The problem here is that TestComplete did not notice this transition and still thinks that Panel(0) is the random panel thus failing to find child Panel("MVCalcFormulaID_list"). You can resolve this by using Refresh() in between the clicks: function Test() { var page; Browsers.Item(btFirefox).Navigate("http://demos.telerik.com/kendo-ui/dropdownlist/index"); page = Sys.Browser().Page("http://demos.telerik.com/kendo-ui/dropdownlist/index"); page.Wait(); page.Panel("main").Panel("exampleWrap").Panel("example").Panel("cap_view").TextNode(3).Click(); page.Refresh(); page.Panel(0).Panel("color_list").Panel(1).TextNode(1).Click(); } Even better approach is to use FindChild to find the problematic panel, it will eliminate the ambigious Panel(0) and call Refresh() automatically: function Test() { var page; Browsers.Item(btFirefox).Navigate("http://demos.telerik.com/kendo-ui/dropdownlist/index"); page = Sys.Browser().Page("http://demos.telerik.com/kendo-ui/dropdownlist/index"); page.Wait(); page.Panel("main").Panel("exampleWrap").Panel("example").Panel("cap_view").TextNode(3).Click(); page.FindChild("Name", 'Panel("color_list")', 10, true).Panel(1).TextNode(1).Click(); } TextNode(1) here is also ambigious because you are reffering the desired item by its index. Consider using the item text instead: function Test() { var page; Browsers.Item(btFirefox).Navigate("http://demos.telerik.com/kendo-ui/dropdownlist/index"); page = Sys.Browser().Page("http://demos.telerik.com/kendo-ui/dropdownlist/index"); page.Wait(); page.Panel("main").Panel("exampleWrap").Panel("example").Panel("cap_view").TextNode(3).Click(); page.FindChild("Name", 'Panel("color_list")', 10, true).Panel(1).FindChild("contentText", "Orange").Click(); } The only thing left to handle is the scroll bar. The native method scrollIntoView() will suffice: function Test() { var page; Browsers.Item(btFirefox).Navigate("http://demos.telerik.com/kendo-ui/dropdownlist/grouping"); page = Sys.Browser().Page("http://demos.telerik.com/kendo-ui/dropdownlist/grouping"); page.Panel("main").Panel("exampleWrap").Panel("example").Panel(0).TextNode(2).Click(); var item = page.FindChild("Name", 'Panel("customers_list")', 10, true).Panel(1).FindChild("contentText", "Isabel de Castro"); item.scrollIntoView(); item.Click(); } If your combobox uses virtualization http://demos.telerik.com/kendo-ui/dropdownlist/virtualization things become more complicated since the desired item might not be loaded before you manually scroll to it. In this case you need to use Point and fix, scroll to the desired item, point to the scroll bar and capture it to get its scrollTop value to use in your script like this: function Test() { var page; var panel; page = Sys.Browser().Page("http://demos.telerik.com/kendo-ui/dropdownlist/virtualization"); page.Panel("main").Panel("exampleWrap").Panel("example").Panel(0).TextNode(2).Click(10, 1); panel = page.FindChild("Name", "Panel('orders_list')", 10, true).Panel(0).Panel(1); panel.scrollTop = 11400; while (panel.FindChild("contentText", "loading...").Exists); // Waiting for items to load panel.FindChild("contentText", "10691\nQUICK-Stop, Germany").Click(); } If neither of the provided solutions does not work for you, there is a public API http://docs.telerik.com/kendo-ui/api/javascript/ui/dropdownlist. It might be not the best solution in terms of UI functional testing, but it does the trick: function Test() { var page; var panel; Browsers.Item(btFirefox).Navigate("http://demos.telerik.com/kendo-ui/dropdownlist/virtualization"); page = Sys.Browser().Page("http://demos.telerik.com/kendo-ui/dropdownlist/virtualization"); var script = page.contentDocument.Script; var dropdownlist = script.$("#orders").data("kendoDropDownList"); dropdownlist.select(200); dropdownlist.trigger("change"); } Hope this helps.4.7KViews2likes1CommentRe: Dropdown list wont support ClickItem etc
Hi, According to your code snippet you are clicking the combobox twice, so the first click causes it to open and the second one to close thus making the desired item not visible. The easiest way to accomplish your task is to record your actions, see Recording Automated Tests - Overview. If you prefer to write the code manually or the recording approach does not work for you here is another way. To simulate ClickItem behavior you basically need to click the combobox to open it and then click the desired item. Your code snippet already contains the first part. To find the desired item you need to open the combobox and then select the item using Point and fix as Tanya mentioned. So your final script should look like this: Aliases.browser.pageBillingGroupDetails.EditBillingGroupDetails.dropdown_Cycle.Click <path to the desired item>.Click Hope this helps.4.8KViews0likes3Comments