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. automation

automation

Scheduled Pinned Locked Moved C#
testingtoolshelpquestion
4 Posts 2 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.
  • S Offline
    S Offline
    s_khan_876
    wrote on last edited by
    #1

    try { HTMLInputElement ieButton = (HTMLInputElement)myDoc.all.item(ButtonName, 0); ieButton.click(); } catch (Exception ex) { MessageBox.Show(ex.Message); } i m doing internet explorer automation. i do the automation of click event of buttons ,i need same for images ,can any one help me out?

    B 1 Reply Last reply
    0
    • S s_khan_876

      try { HTMLInputElement ieButton = (HTMLInputElement)myDoc.all.item(ButtonName, 0); ieButton.click(); } catch (Exception ex) { MessageBox.Show(ex.Message); } i m doing internet explorer automation. i do the automation of click event of buttons ,i need same for images ,can any one help me out?

      B Offline
      B Offline
      blackjack2150
      wrote on last edited by
      #2

      Take the image as a HTMLElement object and use the InvokeMember method, providing the name of the function as a parameter. I don't know for sure if it'll work, but it's worth a try. Good luck!

      S 1 Reply Last reply
      0
      • B blackjack2150

        Take the image as a HTMLElement object and use the InvokeMember method, providing the name of the function as a parameter. I don't know for sure if it'll work, but it's worth a try. Good luck!

        S Offline
        S Offline
        s_khan_876
        wrote on last edited by
        #3

        can u plz provide me with the chunk of code for images??

        B 1 Reply Last reply
        0
        • S s_khan_876

          can u plz provide me with the chunk of code for images??

          B Offline
          B Offline
          blackjack2150
          wrote on last edited by
          #4

          Check out this thread. http://www.codeproject.com/script/comments/forums.asp?msg=2045657&forumid=1649&mode=all&userid=3539989#xx2045657xx[^] It's not exactly what you're looking for(image clicks), but I think you can make an idea about what you need to do. I think that for the image clicks, you'll have to load the page to HtmlDocument object and use it's InvokeScript method. The parameter will be the name of the script function which is called when the user clicks the image.

          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