objApplication =
Browser.SilverlightApps().GetApp(0);
objApplication.Connect();
DataGrid
objDataGrid =
objApplication.Find.ByName<
DataGrid
>("dataGrid");
objDataGrid.Rows[0].Cells[0].Find.ByName<
RadioButton
>().User.Click();
Hello,
I am working on programmatically automating tabstops in radgrid.Can you please give me some idea to accomplish the same.
In Real scenario, when the user clicks on right arrow, the grid cell focus should be moved to next cell, which is the usual scenario that we perform in an excel or any other grid pattern. The same functionality should be automated with TestStudio. I have checked couple of links..but still need more information…
http://www.telerik.com.tw/help/winforms/tabstrip-radtabstrip-select-tab-programmatically.html
Thanks,
Abi
<
table
>
<
tbody
>
<
tr
>
<
td
>Reason waived</
td
>
<
td
>
<
input
id
=
"feeForm:reasonWaived"
type
=
"text"
name
=
"feeForm:reasonWaived"
/>
</
td
>
<
td
/>
</
tr
>
</
tbody
>
</
table
>
8/30/2011 2:08:41 PM' - Detected DataDriven Test. Starting data iterations.
'8/30/2011 2:08:41 PM' - [Iteration #1: (Login=cindy.thomas)]
Overall Result: Fail'8/30/2011 2:08:52 PM' - 'Fail' :
1. Set 'ContentPlaceHolder1UsernameTextBoxText' text to '' - DataDriven: [$(Login)]------------------------------------------------------------
Failure Information: ~~~~~~~~~~~~~~~Unable to locate element. Details: Attempting to find [Html] element using Find logic (Html): [id 'Exact' ctl00_ContentPlaceHolder1_UsernameTextBox] AND [tagname 'Exact' input]Unable to locate element. Search failed!
Why am I getting this error?
Settings settings = GetSettings();
settings.Web.DefaultBrowser = BrowserType.InternetExplorer;
settings.Web.EnableSilverlight =
true
;
Initialize(settings,
new
TestContextWriteLine(
this
.TestContext.WriteLine));
Manager.LaunchNewBrowser();
ActiveBrowser.NavigateTo(
"http://localhost/TestSLAppTestPage.html"
);
ActiveBrowser.WaitUntilReady();
var slApp = ActiveBrowser.SilverlightApps()[0];
Assert.IsNotNull(slApp);
var button = slApp.FindName<Button>(
"button1"
);
Assert.IsTrue(button.Text.Equals(
"Click Me"
));
When I run this test it passes but I am unable to debug it. When I put a breakpoint at ActiveBrowser.SilverlightApps line and try to evaluate the object returned by the method it gives an error saying that Function evaluation timed out. and Function evaluation disabled because a previous function timed out.
Error: PipeCommunication.AsyncPipeRead() : EXCEPTION ("Pipe Null State: False")
Type: System.Threading.ThreadAbortException
Message: Thread was being aborted.
Call Stack:
at System.Threading.WaitHandle.WaitOneNative(SafeHandle waitableSafeHandle, UInt32 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext)
at System.Threading.WaitHandle.InternalWaitOne(SafeHandle waitableSafeHandle, Int64 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext)
at System.Threading.WaitHandle.WaitOne(Int32 millisecondsTimeout, Boolean exitContext)
at System.Threading.WaitHandle.WaitOne()
at ArtOfTest.WebAii.Messaging.Process.PipeCommunication.AsyncPipeRead(PipeStream pipe, Byte[] bytes, Int32 offset, Int32 count)
The program '[7604] QTAgent32.exe: Managed (v4.0.30319)' has exited with code 0 (0x0).
ConfirmDialog confirmDialog = ConfirmDialog.CreateConfirmDialog(Manager.Current.ActiveBrowser, DialogButton.OK);
confirmDialog.HandlerDelegate = new DialogHandlerDelegate(this.ConfirmHandleDialog);
Manager.Current.DialogMonitor.AddDialog(confirmDialog);
Manager.Current.DialogMonitor.Start();
// Click the button
this.Action.MouseClickItem(RSSControls.Applications.ApplicationsEditLoginPage.DeleteQuestion);
confirmDialog.WaitUntilHandled();
Manager.Current.DialogMonitor.RemoveDialog(confirmDialog);
Manager.Current.DialogMonitor.Stop();
private void ConfirmHandleDialog(IDialog dialog)
{
ArtOfTest.WebAii.Win32.Button b = new ArtOfTest.WebAii.Win32.Button(dialog.Window, "OK", false);
b.Click();
dialog.HandleCount = 1;
Manager.Current.DialogMonitor.RemoveDialog(dialog);
}
Am I doing something incorrect? The tests work correctly when I run them individually but when I run them together the second test does not work. The message box confirmation box pops up, but it never gets handled. I have looked all over the internet and found several examples of how to use this feature, however I am still having problems.
Also, does this function work in IE7? It appears to not work at all when I test my tests against an IE7 machine.