Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Question on mshtml.

Question on mshtml.

Scheduled Pinned Locked Moved C#
questionjavascripttestingtools
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Evgeni57
    wrote on last edited by
    #1

    Hey, I'm building some automation tool of some web site. It has the following code:

    <TD style="cursor:pointer" align="right" dir="ltr" onClick="javascript:function1(list of params);" id="12345">qwerty</TD>

    . I'm using EtmlDocument HtmlElementCollection and HtmlElement and my HtmlElement variable has: OuterHtml =

    <TD style="cursor:pointer" align="right" dir="ltr" onClick="javascript:function1(list of params);" id="12345">qwerty</TD>

    OuterText = "qwerty" What should I do in order to generate mouse click and fire function1 and get the reply? Thanks.

    M 1 Reply Last reply
    0
    • E Evgeni57

      Hey, I'm building some automation tool of some web site. It has the following code:

      <TD style="cursor:pointer" align="right" dir="ltr" onClick="javascript:function1(list of params);" id="12345">qwerty</TD>

      . I'm using EtmlDocument HtmlElementCollection and HtmlElement and my HtmlElement variable has: OuterHtml =

      <TD style="cursor:pointer" align="right" dir="ltr" onClick="javascript:function1(list of params);" id="12345">qwerty</TD>

      OuterText = "qwerty" What should I do in order to generate mouse click and fire function1 and get the reply? Thanks.

      M Offline
      M Offline
      Member 1033907
      wrote on last edited by
      #2

      Do I get it right that you are writing some bot that clicks on web pages and processes the replies, pretending to be human?

      E 1 Reply Last reply
      0
      • M Member 1033907

        Do I get it right that you are writing some bot that clicks on web pages and processes the replies, pretending to be human?

        E Offline
        E Offline
        Evgeni57
        wrote on last edited by
        #3

        Yes, you do.

        D M 2 Replies Last reply
        0
        • E Evgeni57

          Yes, you do.

          D Offline
          D Offline
          dan sh
          wrote on last edited by
          #4

          Sounds suspicious.

          जय हिंद

          1 Reply Last reply
          0
          • E Evgeni57

            Yes, you do.

            M Offline
            M Offline
            Member 1033907
            wrote on last edited by
            #5

            Well, I don't know. When I did this, none of the pages I targeted used javascripts for server interaction so it was easy to simulate clicking with HttpWebRequest/Response classes. In your case, I guess you'll have to emulate the javascript flow, as browsers do, to get the idea what the actual request should be. Unless someone else has something to say. H.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups