Hi,
Today, I use MouseClickType.LeftDoubleClick to test out silverlight app, but it doesn't work.
Our requirement is that double click the left key of the mouse on the content of one textblock, the content will be filled in another textbox, here is my test code:
But during execution, the content can not be filled into the defined textbox.
However, if I double click the left key of the mouse manually, the content can be filled in the textbox. So I need your help! thanks!!
Today, I use MouseClickType.LeftDoubleClick to test out silverlight app, but it doesn't work.
Our requirement is that double click the left key of the mouse on the content of one textblock, the content will be filled in another textbox, here is my test code:
silApp.FindName(
"ExpandSite"
).Find.ByName(
"ExpandSite"
).Find.ByName(
"textBlock"
).User.Click(MouseClickType.LeftDoubleClick,
new
System.Drawing.Point(20, 20));
But during execution, the content can not be filled into the defined textbox.
However, if I double click the left key of the mouse manually, the content can be filled in the textbox. So I need your help! thanks!!
7 Answers, 1 is accepted
0
Hello Lucia,
I've seen this type of thing before, and it turned out to be a timing issue. Try editing the step sequence to something like this:
If you continue to have difficulty, we'll need to see the issue first-hand to troubleshoot. Does a public site exhibit the same behavior?
Greetings,
Anthony
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
I've seen this type of thing before, and it turned out to be a timing issue. Try editing the step sequence to something like this:
- LeftClick
- Small execution delay: System.Threading.Thread.Sleep(50);
- LeftDoubleClick
- Enter text
If you continue to have difficulty, we'll need to see the issue first-hand to troubleshoot. Does a public site exhibit the same behavior?
Greetings,
Anthony
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
lucia
Top achievements
Rank 1
answered on 10 Jan 2012, 03:37 AM
Hi,
I have tried the steps you replied as below
But it doesn't work yet... :(
Thanks again for your help!!
I have tried the steps you replied as below
silApp.FindName("ExpandSite").Find.ByName("ExpandSite").User.Click(MouseClickType.LeftClick,
new System.Drawing.Point(20,
20));
silApp.FindName("ExpandSite").Find.ByName("ExpandSite").SetFocus();
System.Threading.Thread.Sleep(100);
silApp.FindName("ExpandSite").Find.ByName("ExpandSite").Find.ByName("textBlock").User.Click(MouseClickType.LeftDoubleClick,
new System.Drawing.Point(20, 20));
But it doesn't work yet... :(
Thanks again for your help!!
0
Hello Lucia,
Anthony
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
To continue troubleshooting I'll need to see the issue first-hand. Please either provide access to your application or a public site that demonstrates the same behavior.
Regards,Anthony
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
lucia
Top achievements
Rank 1
answered on 11 Jan 2012, 10:34 AM
Hi, Anthony
Thanks for your reply!
Today I run the test code on XP OS, the leftdoubleclick can work.
The issue I mentioned before occurs on Win7...
Hope the info can help you troubleshoot the issue...
Thanks!
Lucia
Thanks for your reply!
Today I run the test code on XP OS, the leftdoubleclick can work.
The issue I mentioned before occurs on Win7...
Hope the info can help you troubleshoot the issue...
Thanks!
Lucia
0
Hello Lucia,
Anthony
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Unfortunately it doesn't. I still need to see the issue directly to get to the bottom of the problematic behavior.
All the best,Anthony
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
lucia
Top achievements
Rank 1
answered on 13 Jan 2012, 03:35 AM
Oh, so sorry for not providing the application to you because we have not public site and the application is confidential for our company.
May you can try reproduce it on Windows7.
The steps like below:
1. You can prepare a silverlight application with the function that left double click some text block and the text can be filled into a text box.
2. Use the method leftdoubleclick to simulate user's operation
3. Watch the behavior
Thanks
Lucia
May you can try reproduce it on Windows7.
The steps like below:
1. You can prepare a silverlight application with the function that left double click some text block and the text can be filled into a text box.
2. Use the method leftdoubleclick to simulate user's operation
3. Watch the behavior
Thanks
Lucia
0
Hello Lucia,
Regards,
Anthony
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
See below for code that double clicks a Silverlight TextBlock and inputs text. Please test it directly and compare it to your implementation:
Manager.Settings.Web.EnableSilverlight =
true
;
Manager.LaunchNewBrowser(BrowserType.InternetExplorer);
ActiveBrowser.NavigateTo(
"http://demos.telerik.com/silverlight/#GridView/CellEditTemplate"
);
System.Threading.Thread.Sleep(10000);
SilverlightApp app = ActiveBrowser.SilverlightApps()[0];
TextBlock tb = app.Find.ByExpression(
new
XamlFindExpression(
"XamlTag=gridviewvirtualizingpanel"
,
"automationid=PART_GridViewVirtualizingPanel"
,
"|"
,
"XamlPath=/gridviewrow[0]/border[0]/selectivescrollinggrid[name=grid]/datacellspresenter[name=PART_DataCellsPresenter]/grid[0]/itemspresenter[0]/gridviewcellspanel[0]/gridviewcell[1]/grid[0]/contentpresenter[name=PART_ContentPresenter]/textblock[0]"
)).As<TextBlock>();
Assert.IsNotNull(tb);
tb.Wait.ForExists(10000);
tb.User.Click(MouseClickType.LeftDoubleClick);
Manager.Desktop.KeyBoard.TypeText(
"Tester"
, 100);
Manager.Desktop.KeyBoard.KeyPress(System.Windows.Forms.Keys.Enter);
System.Threading.Thread.Sleep(1500);
Anthony
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.