We are building a new experience for our SmartBear Community.
This site is now read-only. You can still browse and search as usual. Learn More
This site is now read-only. You can still browse and search as usual. Learn More
I have recorded a keyword test and generated a script from it. I had to make changes to the script due to the fact that the test did not wait for the icon bar to display. I also mistakenly accepted an intelligent fix which caused a "ribbon2" to be created/mapped? I deleted "ribbon2" from the mapping and from the script.
When I run the test from the script it looks for "Ribbon". When I run it from the keyword test it looks for "Ribbon2" and consequently fails.
How can I fix the keyword test to look for "Ribbon" instead of "Ribbon2"? Images attached.
TiA - Astrid
Ensure your https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/index.html are defined and structured correctly, and make use of https://support.smartbear.com/testcomplete/docs/testing-with/exploring-apps/object-browser/about.html.
1. It could be a slight bug in TC, hence you can't find the object.
2. It's not possible to convert scripts to keyword tests
Once you added the property to MSAA, if you use the Object Spy tool, it should highlight each of the buttons. Object Browser may show you more details, like this
Look for the keyword test that references Ribbon2, and update it.
If you double click the error in the message log, it should take you straight to the keyword test.
You need to check your Mapped Objects and Aliases names, and verify the property values of those objects are correct.
In you script file, you can right click on either of the objects in Aliases.draft.wndAfx.Ribbon.Main and select Go to Definition. It will take you to the mapped object.
Ensure your https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/index.html are defined and structured correctly, and make use of https://support.smartbear.com/testcomplete/docs/testing-with/exploring-apps/object-browser/about.html.
1. It could be a slight bug in TC, hence you can't find the object.
2. It's not possible to convert scripts to keyword tests
Once you added the property to MSAA, if you use the Object Spy tool, it should highlight each of the buttons. Object Browser may show you more details, like this
rraghvani, thank you so much for all of your help. I am marking my question as solved. - My parent Ribbon object has 3 children, Window("ToolbarWindow32", "Main", 2), Window("ToolbarWindow32", "Typical", 1), and Window("#32770", "Ribbon", 1). I am able to individually select buttons only on the Window("#32770", "Ribbon", 1) icon bar but I can get my test to complete by running from the script. Thank You again! There is a LOT to learn!
I can't see Ribbon2 being used anywhere 😕 ?
FYI. If you were to add the WndClass property value 'AfxControlBar140' to MSAA (Project Settings), you might be able to access the individual buttons
Thank You!
I do not see Ribbon2 anywhere either. Yet when I run the keyword test is fails with Ribbon2Error. When I look at the script generated from the keyword test I get this: Aliases.draft.wndAfx.Ribbon2.Main.CheckItem(40068, true, false);
I change it to Aliases.draft.wndAfx.Ribbon.Main.CheckItem(40068, true, false); running the script also fails because it does not find Main which is why I insert Aliases.draft.wndAfx.Ribbon.WaitVCLNETObject;
Delay(5000); and save. Now the script succeeds most of the time.
I guess my questions are:
I have found MSAA and added AfxControlBar140. Have not had a chance to play with it yet.