Forum Discussion

DavidRedmayne's avatar
DavidRedmayne
Occasional Contributor
8 years ago

Unable to see Dropdowns

We had a suite of tests which worked fine! After the latest patch from our third party devs, the tests no longer run.

 

The main issue relates to dropdowns; formerly, a user could hover over a menu item which would render the dropdown menu beneath and then select the item from the list. When we scripted the tests, we obviously used a positive mouse click rather than any hovering!

 

Now, this new patch has done away with the hover over menu function and even though we use a positive click to trigger the dropdown menu, TestComplete is returning an error 'object not found' even though the dropdown is appearing.

 

Any suggestions please?

Thanks

 

David

20 Replies

  • baxatob's avatar
    baxatob
    Community Hero

    According to your screenshot the tested object is a link.

    Clicking on this link should open a dropdown, right?

     

    Also I don't see "object not found" error in your log. Looks like this is your custom error message in the log. Can you provide an original error?

    • DavidRedmayne's avatar
      DavidRedmayne
      Occasional Contributor

      Hi - thanks for your response.

       

      Yes - you are quite right - Menus are links and when clicked the drop-down is rendered (see screenshot). The actual log error is "The Drop-Down box cannot be opened".

       

      Script is below - sticking point being "Aliases.browser.pageNeonCms8.manelMainMenu.linkCustomers.DropDown"

       

      [Mod edit: removed private info]

      function Test5()
      {
        //Launches the specified browser and opens the specified URL in it.
        Browsers.Item(btIExplorer, "", Browsers.pX64).Run("https://neonsit.gentingcasinosuk.com/cmsweb");
        //Waits until the browser loads the page and is ready to accept user input.
        Aliases.browser.pageNeonCms.Wait();
        //Clicks at point (56, 15) of the 'textboxUsername' object.
        Aliases.browser.pageNeonCms.formIgSigninFormNgPristineNgVali.textboxUsername.Click(56, 15);
        //Sets the text in the 'textboxUsername' text editor.
        Aliases.browser.pageNeonCms.formIgSigninFormNgPristineNgVali.textboxUsername.SetText("USERNAME_PLACEHOLDER");
        //Enters '[Tab]' in the 'textboxUsername' object.
        Aliases.browser.pageNeonCms.formIgSigninFormNgPristineNgVali.textboxUsername.Keys("[Tab]");
        //Sets the text in the 'passwordboxPassword' text editor.
        Aliases.browser.pageNeonCms.formIgSigninFormNgPristineNgVali.panelFormGroup.panelIgGridItem.passwordboxPassword.SetText("PASSWORD_PLACEHOLDER");
        //Clicks the 'buttonLogin' button.
        Aliases.browser.pageNeonCms.formIgSigninFormNgPristineNgVali.buttonLogin.ClickButton();
        //Waits until the browser loads the page and is ready to accept user input.
        Aliases.browser.pageNeonCms8.Wait();
        //Clicks the 'OK' button of the 'modalNeonCasinoManagementSystem' modal dialog.
        Aliases.browser.pageNeonCms8.modalNeonCasinoManagementSystem.Keys("[Enter]");
        //Opens the 'linkCustomers' drop-down window.
        Aliases.browser.pageNeonCms8.panelMainMenu.linkCustomers.DropDown();
        //Clicks the 'linkCustomermanagementCustomerma' control.
        Aliases.browser.pageNeonCms8.panelMainMenu.linkCustomermanagementCustomerma.Click();
        //Opens the 'linkHome' drop-down window.
        Aliases.browser.pageNeonCms8.panelMainMenu.linkHome.DropDown();
        //Clicks an item of the 'linkHome2' drop-down control.
        Aliases.browser.pageNeonCms8.panelMainMenu.linkHome2.ClickItem("Log Out");
        //Waits until the browser loads the page and is ready to accept user input.
        Aliases.browser.pageNeonCms3.Wait();
        //Closes the 'BrowserWindow' window.
        Aliases.browser.BrowserWindow.Close();
      }

       

      • Colin_McCrae's avatar
        Colin_McCrae
        Community Hero

        "Now, this new patch has done away with the hover over menu function and even though we use a positive click to trigger the dropdown menu, TestComplete is returning an error 'object not found' even though the dropdown is appearing."

         

        So the test runs to the point where you click the menu item which triggers the dropdown. This all still works and still happens correctly yes?

         

        So your issue is that the DropDown, although present, is no longer recognised?

         

        Which would suggest that it's just a mapping problem. So either the structure has changed, and your dropdown is not present in the same place in the DOM as it was before, or they have changed something in the properties which has affected one of the properties you use to identify it, or one of it's parent objects.

         

        Have you tried simply re-mapping the object?