Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

WebBrowser -> Formular füllen und abschicken

Empfohlene Antworten

Veröffentlicht

Hallo,

ich habe ein kleines Problem. Ich würde gerne in einer C# Anwendung ...

a) eine WebSeite in einem WebBrowser-Steuerelement laden,

B) In bestimmte Formularfelder bestimmte Werte eintragen und

c) das Formular abschicken (also den submit-Button drücken).

Das ganze sollte ohne Zutun des Benutzer ablaufen. Die Schritte a) und B) bekomme ich auch ganz gut hin - ist ja nun auch nicht so schwer. Bloß beim Schritt c) komme ich nicht weiter.

Also, hat jemand einen Vorschlag oder noch besser eine Lösung für mein Problem?

  • 4 Wochen später...

schau dir mal die axwebbrowser komponente an. aus der bekommst du

so

HTMLDocument myDoc = new HTMLDocumentClass();

			myDoc = (HTMLDocument) axWebBrowser1.Document;

			IHTMLElementCollection item = myDoc.all;

			elementListe.Clear();

			elementListe.Capacity = item.length;

			foreach (IHTMLElement el in item)

			{

				elementListe.Add(el);

			}

			this.panel1.BringToFront();

IHTML Elemente und die haben zb ein click event ... dann musst du "nur" noch das element richtig identivizieren

viel spaß

grüße wolf

Hallo,

ich habe ein kleines Problem. Ich würde gerne in einer C# Anwendung ...

a) eine WebSeite in einem WebBrowser-Steuerelement laden,

B) In bestimmte Formularfelder bestimmte Werte eintragen und

c) das Formular abschicken (also den submit-Button drücken).

Das ganze sollte ohne Zutun des Benutzer ablaufen. Die Schritte a) und B) bekomme ich auch ganz gut hin - ist ja nun auch nicht so schwer. Bloß beim Schritt c) komme ich nicht weiter.

Also, hat jemand einen Vorschlag oder noch besser eine Lösung für mein Problem?

Soll der User das unbedingt sehen? Ich würde einen HTTP Sniffer mitlaufen lassen und die Seite im Browser ausfüllen und senden. Dann guckst du dir an wie das HTTP-Post dafür aussieht und programmierst das selber, ich glaube mit System.Net.Http.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.