01-24-2012, 12:41 PM
(01-23-2012, 09:00 PM)Lachsi Wrote: Hey there,
I am evaluating QTP if it's more useful for us (Bosch) than TOSCA Tricentis. Right now, I am encountering following problem:
I'm automating a Software, the Window of this Software is called "FSA 050 / 500". This program starts with a list of a whole bunch of submenus, where the window will switch by entering them by pressing the F12.
SwfWindow("FSA 050 / 500").SwfWindow("TP_Start").SwfTreeView("m_oTreeView").Select 50
SwfWindow("FSA 050 / 500").SwfWindow("TP_Start").SwfButton("F12").Click
When I enter the submenu in index 50 as example, the window title will expand from "FSA 050 / 500" to "FSA 050 / 500 - Universal oscilloscope 2 channel" and that's some serious issue! The question ist: how can I teach QTP, that it shall use the window title "FSA 050 / 500" and ignoring everything else behind? I've tried regular expressions, but failed. Somehow, and I really don't know why, QTP worked as I wished for. I've entered the submenu and QTP recorded those controls still under "FSA 050 / 500"
->
SwfWindow("FSA 050 / 500").SwfWindow("C_MultiScope").SwfEditor("m_oInfoBox_2").Check CheckPoint("m_oInfoBox_5")
SwfWindow("FSA 050 / 500").SwfWindow("C_MultiScope").SwfButton("F12").Click
Unfortunately, it now looks like:
SwfWindow("FSA 050 / 500 - Universal oscilloscope 2 channel").SwfWindow("C_MultiScope").SwfEditor("m_oInfoBox_2").Check CheckPoint("m_oInfoBox_5")
SwfWindow("FSA 050 / 500 - Universal oscilloscope 2 channel").SwfWindow("C_MultiScope").SwfButton("F12").
Has someone a clue? Sometimes it works as wished, sometimes not. It was always only the .NET addin loaded. Thanks!
Use Regular expression for title and try
SwfWindow("FSA 050 / 500.*").SwfWindow("C_MultiScope").SwfEditor("m_oInfoBox_2").Check CheckPoint("m_oInfoBox_5")