File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
PuppeteerSharp.Tests/ClickTests Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -127,8 +127,8 @@ public async Task ShouldSelectTheTextByTripleClicking()
127127 const string text = "This is the text that we are going to try to select. Let's see how it goes." ;
128128 await Page . Keyboard . TypeAsync ( text ) ;
129129 await Page . ClickAsync ( "textarea" ) ;
130- await Page . ClickAsync ( "textarea" , new ClickOptions { ClickCount = 2 } ) ;
131- await Page . ClickAsync ( "textarea" , new ClickOptions { ClickCount = 3 } ) ;
130+ await Page . ClickAsync ( "textarea" , new ClickOptions { Count = 2 } ) ;
131+ await Page . ClickAsync ( "textarea" , new ClickOptions { Count = 3 } ) ;
132132 Assert . AreEqual ( text , await Page . EvaluateFunctionAsync < string > ( @"() => {
133133 const textarea = document.querySelector('textarea');
134134 return textarea.value.substring(
@@ -258,7 +258,7 @@ await Page.EvaluateExpressionAsync(@"{
258258 });
259259 }" ) ;
260260 var button = await Page . QuerySelectorAsync ( "button" ) ;
261- await button . ClickAsync ( new ClickOptions { ClickCount = 2 } ) ;
261+ await button . ClickAsync ( new ClickOptions { Count = 2 } ) ;
262262 Assert . True ( await Page . EvaluateExpressionAsync < bool > ( "double" ) ) ;
263263 Assert . AreEqual ( "Clicked" , await Page . EvaluateExpressionAsync < string > ( "result" ) ) ;
264264 }
Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ public override Task DownAsync(ClickOptions options = null)
132132 {
133133 Type = MouseEventType . MousePressed ,
134134 Modifiers = _keyboard . Modifiers ,
135- ClickCount = options . ClickCount ,
135+ ClickCount = options . Count ,
136136 Buttons = ( int ) state . Buttons ,
137137 Button = options . Button ,
138138 X = state . Position . X ,
@@ -163,7 +163,7 @@ public override Task UpAsync(ClickOptions options = null)
163163 {
164164 Type = MouseEventType . MouseReleased ,
165165 Modifiers = _keyboard . Modifiers ,
166- ClickCount = options . ClickCount ,
166+ ClickCount = options . Count ,
167167 Buttons = ( int ) state . Buttons ,
168168 Button = options . Button ,
169169 X = state . Position . X ,
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ public class ClickOptions
1313 /// <summary>
1414 /// Defaults to 1. See https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/detail.
1515 /// </summary>
16- public int ClickCount { get ; set ; } = 1 ;
16+ public int Count { get ; set ; } = 1 ;
1717
1818 /// <summary>
1919 /// The button to use for the click. Defaults to <see cref="MouseButton.Left"/>.
You can’t perform that action at this time.
0 commit comments