0

(Without using selenium IDE)

May I know is that possible if I want develop a software that will repeat back what was user done before this in a website?

For example: user had click a button and insert text into textbox in a website. May I know how can I repeat back what was user done just know with using c#.

My Logic: Can I get the ID of web element that was used/clicked by user in a website with using c# without view to the source code of that website so after that I can use back the ID to repeat the actions that had done by user just now?

tenkeason
  • 13
  • 4
  • is this supposed to be some kind of keylogger? – slawekwin Aug 30 '16 at 06:28
  • similar, but mostly focus on the web elements. – tenkeason Aug 30 '16 at 06:33
  • You could add an OnChanged/OnKeyPress/OnSeletedIndexChanged (and event for every control) and attach it via Ajax to a method that stores the action based on control type. To "play it back," simply perform each stored command with a delay from a background thread, Invoking each change. What types of controls are on the page you want to monitor? – Shannon Holsinger Aug 30 '16 at 06:45
  • Have a look at EventFiringWebDriver and WebDriverEventListener. The listener exposes many methods which you can override and log actions. – Grasshopper Aug 30 '16 at 08:00
  • @ShannonHolsinger is that only work on window form? – tenkeason Sep 01 '16 at 01:09
  • @Grasshopper either one also can? – tenkeason Sep 01 '16 at 01:14
  • @tenkeason, my answer was tailored to WinForm, but you could do the same thing with WPF or with console app. – Shannon Holsinger Sep 01 '16 at 01:23
  • @ShannonHolsinger sorry I'm confused about how to use the(OnChanged/OnKeyPress/OnSeletedIndexChanged ) for the web element. As I know and I found at online, it only work on window form not web. May you explain more or maybe I got something wrong info. – tenkeason Sep 01 '16 at 03:12
  • Ok - are you developing a web project? Let's be clear there first. This is webForm not WinForm, correct? – Shannon Holsinger Sep 01 '16 at 03:14
  • @tenkeason I did not understand your comment. Please explain... – Grasshopper Sep 01 '16 at 05:30

0 Answers0