cancel
Showing results for 
Search instead for 
Did you mean: 

Can you not add your own custom script to a Toolbar button?

SOLVED
Highlighted
New Contributor

Can you not add your own custom script to a Toolbar button?

I've read all the documentation, and is it correct to say that the customization of the toolbar itself, is only to mix and match existing tools from other tool bars?  I've written code in .js to auto-generate/update an excel file that runs our data driven tests.  It basically reads all the TestCases we have, and strips out the individual test cases and populates the excel file, along with where each test excel data corresponding path it maps to.  This made more sense to initiate it on the fly, once the number of tests started growing, and forgetting to update the file everytime we completed a new test case.

 

If there's no way to do this, how would you say, is the best way to initiate this process?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: Can you not add your own custom script to a Toolbar button?

Look into creating it as a script extension.  I'd suggest doing it as a design-time action.  

See https://support.smartbear.com/testcomplete/docs/working-with/extending/script/about.html


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

View solution in original post

4 REPLIES 4
Highlighted
Community Hero

Re: Can you not add your own custom script to a Toolbar button?

Look into creating it as a script extension.  I'd suggest doing it as a design-time action.  

See https://support.smartbear.com/testcomplete/docs/working-with/extending/script/about.html


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

View solution in original post

Highlighted
Community Hero

Re: Can you not add your own custom script to a Toolbar button?


@TraMN wrote:

how would you say, is the best way to initiate this process?


Yep, as Robert has advised...

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] 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 Heroes]
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 Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Highlighted
New Contributor

Re: Can you not add your own custom script to a Toolbar button?

ScriptExtension.png

 

So I followed the directions and got it to show up in the same place as the example.  Does that mean, every script extension that will be a DesignTime (in this case) will display under the same toolbar?  Again, there's no way for me to set this script to its own toolbar and or button?  Thanks for all the help!

Highlighted
Community Hero

Re: Can you not add your own custom script to a Toolbar button?

As per the documentation, the Design-Time actions automatically go to that particular tool bar button.  There's no customization of the button tool bar and/or location using Script Extensions.

Now... if you are a developer with access to something like Visual Studio, you can go the route of custom plug-ins (https://support.smartbear.com/testcomplete/docs/working-with/extending/custom-plugins.html) which allow for more customization to those levels.  


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
New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

Changing options from outside of TestComplete

Participate!

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!
Top Kudoed Authors