lucassklp / Desktop.Robot

A library used to control your mouse and keyboard programmatically in .NET Core
MIT License
139 stars 23 forks source link

Mousewheel test #41

Closed olivercoad closed 1 year ago

olivercoad commented 1 year ago

Adds a test for the new mousewheel method from #38.

It helped find a bug on Linux. Haven't tested on Mac.

On Windows I get this error:

[21:51:54 INF] EXPECTO? Running tests... <Expecto>
[21:51:54 ERR] Desktop.Robot test app.Mouse tests.Can scroll vertical errored in 00:00:00.0200000 <Expecto>
System.ArgumentException: Type 'Desktop.Robot.Windows.Robot+Input[]' cannot be marshaled as an unmanaged structure; no meaningful size or offset can be computed.
   at System.Runtime.InteropServices.Marshal.SizeOfHelper(Type t, Boolean throwIfNotMarshalable)
   at System.Runtime.InteropServices.Marshal.SizeOf[T](T structure)
   at Desktop.Robot.Windows.Robot.MouseScrollVertical(Int32 value) in C:\Users\Oliver\Downloads\Desktop.Robot-mousewheel-test (1)\Desktop.Robot-mousewheel-test\Desktop.Robot\Windows\Robot.cs:line 182
   at Desktop.Robot.Robot.MouseScrollVertical(Int32 value) in C:\Users\Oliver\Downloads\Desktop.Robot-mousewheel-test (1)\Desktop.Robot-mousewheel-test\Desktop.Robot\Robot.cs:line 107
   at MouseTests.tests@117-33.Invoke(Unit unitVar) in C:\Users\Oliver\Downloads\Desktop.Robot-mousewheel-test (1)\Desktop.Robot-mousewheel-test\Desktop.Robot.TestApp\MouseTests.fs:line 117
   at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 508
   at UITestingUtils.robotDoOnThreadpool@81-6.Invoke(AsyncActivation`1 ctxt)
   at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in D:\a\_work\1\s\src\FSharp.Core\async.fs:line 112
[21:51:57 INF] EXPECTO! 49 tests run in 00:00:03.1372604 for Desktop.Robot test app - 48 passed, 93 ignored, 0 failed, 1 errored.  <Expecto>
ovpoddar commented 1 year ago

i m really sorry about that error.

ovpoddar commented 1 year ago

that's happened because the code was unfinished. and get merged before I can confirm few issue.

ovpoddar commented 1 year ago

so i really wanted to asked this to some one so did you saw the behaver on Linux. was that alright?

olivercoad commented 1 year ago

tbh it's just a surface level test to make sure it actually fires events and can do so in both up and down directions. And doesn't throw exceptions, of course. I haven't checked to see how far it scrolls or if it can even scroll different amounts based on value.

On Thu., 29 Jun. 2023, 00:15 Ayan Poddar, @.***> wrote:

so i really wanted to asked this to some one so did you saw the behaver on Linux. was that alright?

— Reply to this email directly, view it on GitHub https://github.com/lucassklp/Desktop.Robot/pull/41#issuecomment-1611497146, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF5P62QSJUQRGFJWYVWIWQ3XNQ4BHANCNFSM6AAAAAAZXARWD4 . You are receiving this because you authored the thread.Message ID: @.***>

ovpoddar commented 1 year ago

so would you like to give me some feedback?

ovpoddar commented 1 year ago

i really need a different perspective.

lucassklp commented 1 year ago

I am testing this to assure that tests will not fail and publish the next version

ovpoddar commented 1 year ago

Thank you Lucas, for providing a better experience to your users. I will be waiting for the next version.

On Sat, 1 Jul 2023 at 17:47, Lucas Simas @.***> wrote:

I am testing this to assure that tests will not fail and publish the next version

— Reply to this email directly, view it on GitHub https://github.com/lucassklp/Desktop.Robot/pull/41#issuecomment-1615881075, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMYHXNML33YMZBY6565OITTXOAIMFANCNFSM6AAAAAAZXARWD4 . You are receiving this because you commented.Message ID: @.***>