You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting "SetProperty of "Text" is not supported on control type: Window" when trying to set text in textbox.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CUITe.SearchConfigurations;
using Microsoft.VisualStudio.TestTools.UITesting;
using CUITe.Controls.HtmlControls;
namespace ABCSmokeTestCuite.ObjectRepository
{
public class ABCLoginPage : BrowserWindowUnderTest
{
public ABCLoginPage()
: base("ABC - Log-in Page")
{
}
public ABCLoginPage(string windowTitle)
: base(windowTitle)
{
}
public HtmlEdit txtTemp1 = new HtmlEdit(By.SearchProperties("Id=ctl00_ContentPlaceHolder1_loginABC_UserName"));
public HtmlPassword txtTemp2 = new HtmlPassword(By.SearchProperties("Id=ctl00_ContentPlaceHolder1_loginABC_Password"));
public HtmlInputButton btnLogIn = new HtmlInputButton(By.SearchProperties("Id=ctl00_ContentPlaceHolder1_loginABC_LoginButton"));
}
}
public void Login(string url, string username, string password)
{
MBESLoginPage loginPage = BrowserWindowUnderTest.GetBrowserWindow<ABCLoginPage>("ABC - Log-in Page");
loginPage.txtTemp1.Text = username;
loginPage.txtTemp2.Text = password;
loginPage.btnLogIn.Click();
}
The text was updated successfully, but these errors were encountered:
public HtmlEdit txtTemp1
{
get
{
return this.Find<HtmlEdit>(By.SearchProperties("Id=ctl00_ContentPlaceHolder1_loginABC_UserName"));
}
}
public HtmlPassword txtTemp2
{
get
{
return this.Find<HtmlPassword>(By.SearchProperties("Id=ctl00_ContentPlaceHolder1_loginABC_Password"));
}
}
public HtmlInputButton btnLogIn
{
get
{
return this.Find<HtmlInputButton>(By.SearchProperties("Id=ctl00_ContentPlaceHolder1_loginABC_LoginButton"));
}
}
Getting "SetProperty of "Text" is not supported on control type: Window" when trying to set text in textbox.
The text was updated successfully, but these errors were encountered: