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

Need help with coded step

1 Answer 116 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jared
Top achievements
Rank 1
Jared asked on 22 Oct 2019, 03:44 PM

Hello, I am new to testStudio, and somewhat new to C#, so this may have an obvious answer, but it seems pretty straightforward...

 

[CodedStep(@"Verify 'logged in' status")]
        public void Verify_logged_in_status()
        {
            Pages.KDHERadon2.SignOutRibbonButton.Wait.ForExists(7000);
            if (Pages.KDHERadon2.SignOutRibbonButton.IsVisible() == false)
            {
                this.ExecuteTest("Login to Radon.tstest");
               
            }
               
        }

 

What I want to happen is if the log out button is not visible, I want the application to execute the log-in 'test' to get logged in. It waits for the element to be visible for 7 seconds, and if it is not visible, it executes the log in test. 

 

But instead of this, this coded step simply 'fails'. I do not understand why this is happening, can someone please enlighten me. 

1 Answer, 1 is accepted

Sort by
0
Plamen Mitrev
Telerik team
answered on 23 Oct 2019, 11:54 AM

Hello Jared,

I tried to reproduce the same scenario on my end against a public application and the test as step was successfully executed. It seems to me that there is something that I am missing, that is specific to the application under test. Please share more details on the following topics.

  • Please gather the Test Studio application log and step failure details and zip them with your next reply, so I can analyze the misbehavior and advise you further.
  • Is it possible to share the .tstest and .tstest.cs files for your current test, located in the project root folder? I will check the SingOutRibbonButton element's find logic and overall test configurations for more details.
  • If I can access the application under test and try to record/code the same scenario that would be very helpful. Otherwise, please try same scenario against a publicly accessible application that we can both test against.

I am looking forward to hearing from you.

Regards,
Plamen Mitrev
Progress Telerik

 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Jared
Top achievements
Rank 1
Answers by
Plamen Mitrev
Telerik team
Share this question
or