I'm new to Test Studio and was trying to add a global variable to the test class. After adding this variable and referencing it in one of the test methods, I can no longer "Play" the test. Clicking Play does nothing. Run to step does nothing. I receive no error messages. At one point, I was unable to access the Class/Code view window for the test. I had to copy all the steps into a new test which let see the code again. Something odd seems to be happening here.
Here's the code. I cut a portion out and removed some comments.
Here's the code. I cut a portion out and removed some comments.
namespace
TestProject1
{
public
class
WebTest : BaseWebAiiTest
{
#region [ Dynamic Pages Reference ]
private
Pages _pages;
public
string
g_sRandomUserName =
"AutomationUser"
;
public
Pages Pages
{
get
{
if
(_pages ==
null
)
{
_pages =
new
Pages(Manager.Current);
}
return
_pages;
}
}
#endregion
// Add your test methods here...
[CodedStep(@
"Enter text '"
+ g_sRandomUserName +
"' in 'MainContentTxtUsernameText'"
)]
public
void
WebTest_CodedStep()
{
// Enter text 'AutomationUser' in 'MainContentTxtUsernameText'
Actions.SetText(Pages.UserAdministrator.MainContentTxtUsernameText, g_sRandomUserName);
}
...