Ask a Question

How to fire event

SOLVED
Kaloyan
Occasional Contributor

How to fire event

Hi Guys,
I have a Navigation Bar with few items inside it. If i go to the TestComplete "Object Browser" , navigate to that Navigation Bar , under its "Events" tab i do see ListItemClick event. Here is the full "path" to it - Aliases["PtDoc"]["frmMain"]["sslbarNavigationBar"]["ListItemClick"].

This event is fired in our application by passing an INT value to it for e.g. 
Aliases["PtDoc"]["frmMain"]["sslbarNavigationBar"]["ListItemClick"](3)

So i ran this function:
function Test1()

{

Aliases["PtDoc"]["frmMain"]["sslbarNavigationBar"]["ListItemClick"](3);

}

 

but i have the following error:
Unable to find the object ListItemClick(3). See Additional Information for details. 8:40:11 Normal Error

Additional info for the error: object with the specified attributes does not exist.

 

So how can i fire the ["ListItemClick"] event from the event tab ?

 

P.S.

The object does exist since i can see it inside the event tab.

 

5 REPLIES 5
shankar_r
Community Hero

Hi,

 

What type of object you are trying to do the operation?

 

Can you post some screen shot object properties?


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”

Extension Available

Kaloyan
Occasional Contributor

Please see the attached screenshot - here are the events inside "Events" tab 

Kaloyan
Occasional Contributor

Here are the properties of the object

I guess Events are read only, you can't access those Events in TestComplete.

 

If you want to select an item or click an button, You use methods to do that.


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”

Extension Available

Hi,

 

Yes, as it was mentioned by @shankar_r and in documentation (http://support.smartbear.com/testcomplete/docs/testing-with/exploring-apps/object-browser/pages.html...), events cannot be fired from tests.

Regards,
  /Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
cancel
Showing results for 
Search instead for 
Did you mean: