0

I have some questions about this subject:

  1. How to click a button with no recognizable id or name?

    Example:

    <input type="submit" value="Login" style="width:100%;"/>
    
  2. It's a bit noobie question but how do I only load essential html objects on a page, not images, just texts and buttons

  3. How to load a javascript from a webpage? Webbrowser.Document.InvokeScript("script") - is that right?

vcsjones
  • 138,677
  • 31
  • 291
  • 286
user2023328
  • 125
  • 2
  • 11

1 Answers1

0

1 question: use other attributes to find that button

2 question: you can follow WebBrowser Customization, and in particular section "Controlling Download and Execution":

The WebBrowser Control gives you control over what it downloads, displays, and executes. To gain this control, you need to implement your host's IDispatch so it handles DISPID_AMBIENT_DLCONTROL. When the WebBrowser Control is instantiated, it will call your IDispatch::Invoke with this ID. Set pvarResult to a combination of following flags, using the bitwise OR operator, to indicate your preferences.

  • DLCTL_DLIMAGES, DLCTL_VIDEOS, and DLCTL_BGSOUNDS: Images, videos, and background sounds will be downloaded from the server and displayed or played if these flags are set. They will not be downloaded and displayed if the flags are not set.

additional info: Implement IDispatch::Invoke to be called by a WebBrowser control

Community
  • 1
  • 1
walter
  • 843
  • 2
  • 14
  • 35