Hi All,
I have seen about 5 or 6 threads on this issue with no real solution or explanation given. I am in Visual Studio 2013 with Telerik Testing Framework. I am using examples provided by your support staff. I have added ArtOfTest.WebAii and Telerik.TestingFramework.Controls.KendoUI references to my solution. Then I have added the following namespaces to my test file (most of which I know are not necessary):
using
ArtOfTest.WebAii;
using
ArtOfTest.WebAii.Controls;
using
ArtOfTest.WebAii.Controls.HtmlControls;
using
ArtOfTest.WebAii.Controls.HtmlControls.HtmlAsserts;
using
ArtOfTest.WebAii.Core;
using
ArtOfTest.WebAii.ObjectModel;
using
NUnit.Framework;
using
Telerik.TestingFramework.Controls.KendoUI;
namespace
VNextTelerik
{
[TestFixture]
public
class
Class1
{
public
Manager myManager;
[SetUp]
public
void
TestFixtureSetUp()
{
// Initialize the settings
Settings mySettings =
new
Settings();
// Set the default browser
mySettings.Web.DefaultBrowser = BrowserType.FireFox;
// Create the manager object
myManager =
new
Manager(mySettings);
// Start the manager
myManager.Start();
}
[Test]
public
void
Kendo()
{
myManager.LaunchNewBrowser();
myManager.ActiveBrowser.NavigateTo(
"http://demos.kendoui.com/web/numerictextbox/events.html"
);
System.Threading.Thread.Sleep(5000);
myManager.ActiveBrowser.RefreshDomTree();
KendoInput textBox = myManager.ActiveBrowser.Find.ByExpression<KendoInput>(
"class=k-widget k-numerictextbox"
);
textBox.TypeText(
"50"
);
}
[TearDown]
public
void
TearDown()
{
// Shut-down the manager and do all clean-up
myManager.Dispose();
}
}
Every time it runs (KendoInput textBox = myManager.ActiveBrowser.Find.ByExpression<KendoInput>("class=k-widget k-numerictextbox");) this returns null. I have tried many many things changing DomRefreshTree, waiting for element, longer thread.sleep (terrible solution). Ive tried to intialize the object as so(KendoInput textBox = new KendoInput).What could be the issue? Ive ran it at least 40 times and only one time did it actually find the object. Ive attached the solution. In all the other threads with this problem your support staff runs peoples project and says it works. I am looking for a reason this may be happening and a possible solution.
thanks