Forum Discussion
tristaanogre
11 years agoEsteemed Contributor
Perhaps, the problem isn't as much with the "Black" option but with the pop up itself. What if you tried the following?
This code hasn't been tested necessarily and may need tweaked but since there are other clicks occuring beore your waiting for "Black" that may open or close other windows (popups), you may need to populate your code with a few more "WaitAliasChild" calls to wait for those popups as well. The "first time it works, second time it doesn't" may not, necessarily, be precisely true... I wouldn't be surprised if a "first time it doesn't" scenario pops up every now and then as well.
Now, yet another "twist"... you're using aliasing and such... is it possible that some of the identifiers you are using to map your different objects are somewhat variable as well between runs? It could be not as much a problem with the WaitNNN method as it might be that you need to investigate and, potentially, tweak your namemapping scheme.
Anywho, hope this helps.
Aliases.toolbar_Task.cmboBx_Publish.btn_Publish.Click();
Aliases.cmbobx_popup_Publish.PublishToPdf.Click();
Aliases.panel_PDFPublishOptions.cmboBx_Coloring.btn_Coloring.Click();
if (Aliases.WaitAliasChild("cmbobx_popup_Coloring").Exists)
{
Aliases.cmbobx_popup_Coloring.WaitAliasChild("Black", 20000);
Aliases.cmbobx_popup_Coloring[strColorOption].Click();
}
else Log.Warning ("Couldn't get the popup")
Aliases.panel_PDFPublishOptions.btn_Publish.Click();
This code hasn't been tested necessarily and may need tweaked but since there are other clicks occuring beore your waiting for "Black" that may open or close other windows (popups), you may need to populate your code with a few more "WaitAliasChild" calls to wait for those popups as well. The "first time it works, second time it doesn't" may not, necessarily, be precisely true... I wouldn't be surprised if a "first time it doesn't" scenario pops up every now and then as well.
Now, yet another "twist"... you're using aliasing and such... is it possible that some of the identifiers you are using to map your different objects are somewhat variable as well between runs? It could be not as much a problem with the WaitNNN method as it might be that you need to investigate and, potentially, tweak your namemapping scheme.
Anywho, hope this helps.
Related Content
- 8 years agoSundaytwins
Recent Discussions
- 3 days agoMW_Didata