Can not click on 'caret' - invisible to TestComplete!
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can not click on 'caret' - invisible to TestComplete!
In main menu, we have some nested sub-menu, that can be revealed by clicking on caret to expand sub-menu. The caret is invisible to Object Spy! Tried to record script and keyword test. Both failed!
This is probably a good time to mention I am new to JScript/JavaScript! Example will be much appreciated. I am using TestComplete 12 with Jascript (not converted the scripts to JavaScript yet, due to tight deadline) and IE11. Please see the screens below.
Thanks in advance.
Dave
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First of all... super Kudos to how you presented the problem. We have screenshots of the UI presentation, we have a shot showing us how the item shows up on the web page source, and we have how TestComplete views the item in the object browser. Without having your application in front of us, this is EXCELLENT information to help us figure things out.
That said, looking at the way the menu is presented, and unless there is other information, what you'll probably end up doing is clicking on the Link('FODMenu_Emergency') object in your script code, doing a "page.Wait()", and then clicking on the next link. The reason I say this is that the caret is not actually being rendered, as I can see, as some sort of control but as simply a visual component of the href link itself. This is why TC is not recognizing it as an object... it's actually part of the Link object.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Can you please attach a screenshot of the available properties and methods of the Caret object in advanced view mode. Meanwhile you can try with the below mentioned code.
(AUT emergency context menu object)Link("FOD_MenuEmergency).set_IsSubmenuOpen(True)
Regards,
Sanjay
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Robert. Thanks for the compliment! I figured, if I am asking for help, better be through. 🙂
The rub is, when clicked on the menu itself, it populates all forms under the category, but does not expand the sub-category!
@ Sanjay
Thanks for your suggestion, I will try and post the result here. The first screenshot is actual shot of Object spy highlighting the menu itself, unaware of the caret. Here is the screen you asked for. I might add, under 'Internet Explorer' (Object Spy > Properties), the innerHTML = <b class="caret" name="caret_Emergency"></b>
Emergency
and
outerHTML = <a name="FODMenu_Emergency" class="selected" href="#" data-category="Level/2">
<b class="caret" name="caret_Emergency"></b>
Emergency
</a>
I don't know if that helps in anyway.
Thanks.
Dave
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Gotcha. OK... so,, the next thing we need is to see if there are any methods or such to "expand". The reason being is that, as noted, the "caret" is being seen as just a class on the link. Are there other methods associated with the link about clicking on the caret? Check the NativeWebObject property and see what methods show there, if there are different "click" methods.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Okay, for NativeWebObject we have:
- click
- querySelector
- querySelectorAll
Thanks
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sanajy
When I run (did not bother to map for testing) -
Sys.Browser("iexplore").Page("https://url/.../FOD/SelectForms.aspx*").Form("aspnetForm").Table(0).Cell(0, 0).Panel(0).Panel("NavFormsOnDemand").Panel("navMenuInner").Link("FODMenu_Emergency").set_IsSubmenuOpen(True);
I get an error: 'True' is undefined. Probably making some mistale. FYI, also tried Click() method as well, same error.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What about methods on the main link object itself? Also, are there any "onclick" properties set on the link?
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@royd wrote:
Hi Sanajy
When I run (did not bother to map for testing) -
Sys.Browser("iexplore").Page("https://url/.../FOD/SelectForms.aspx*").Form("aspnetForm").Table(0).Cell(0, 0).Panel(0).Panel("NavFormsOnDemand").Panel("navMenuInner").Link("FODMenu_Emergency").set_IsSubmenuOpen(True);
I get an error: 'True' is undefined. Probably making some mistale. FYI, also tried Click() method as well, same error.
If you're using JScript, it's case senstive... change "True" to "true"
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Robert, "true" gave an error "Unable to find the object set_IsSubmenuOpen(true). See Additional Information for details. 14:38:30 Normal"
Methods for "onclick" is (Null), has no methods t it. The object "Emergency" has the following:
and
Thanks.
Dave
