This is a migrated thread and some comments may be shown as answers.

Wpf and specflow

1 Answer 23 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 13 Apr 2017, 08:22 AM

Hi, 

Do you have some documentation how to run WPF application and use Specflow?

    class dTrackingTTF :BaseWpfTest
    {
     
        [Given(@"I run the application UK Risk Analyzer")]
        public void GivenIRunTheApplicationUKRiskAnalyzer()
        {

            Manager.LaunchNewApplication(@"C:\Desktop.exe");
            Manager.ActiveApplication.Manager.ActiveApplication.MainWindow.Find.ByTextContent("Daily monitoring").User.Click();         
       }

 

I get an error: 

System.NullReferenceException: Object reference not set to an instance of an object.

 

Regards,

Peter

1 Answer, 1 is accepted

Sort by
0
Elena
Telerik team
answered on 17 Apr 2017, 01:19 PM
Hello Peter,

Thanks for contacting us. 

Could you please elaborate more on what kind of tool is Specflow and how you would like to integrate with Test Studio? 

Additionally I would like to note that you have two Manager.ActiveApplication in the Click method in the provided code - could you please leave the line like this: 

Manager.ActiveApplication.MainWindow.Find.ByTextContent("Daily monitoring").User.Click();

Please let me know if there is anything further I could be helpful with. Thanks! 

Regards,
Elena Tsvetkova
Telerik by Progress
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
Tags
General Discussions
Asked by
Peter
Top achievements
Rank 1
Answers by
Elena
Telerik team
Share this question
or