ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!

Jump to content



Photo

[C#] How do I make Webbrowser1 find certain text and then click it?


  • Please log in to reply
[C#] How do I make Webbrowser1 find certain text and then click it?

#1

J5ck
J5ck
    Offline
    13
    Rep
    70
    Likes

    Epic Gamer

  • PipPipPipPipPip
Posts: 204
Threads: 50
Joined: Jan 07, 2019
Credits: 0

Five years registered
#1

Hi,

 

In short: Can someone tell me the code so that my C# app scans webbrowser1 for text and then click the text

 

 

 

So I need my C# application to scan through Webbrowser1 for a certain piece of text and then click the text (programmatically). << The issue is I don't know the code for that

So for e.g. It looks for "HAUL" on Webbrowser1 and then clicks it. 

 

Why?

 

I'm trying to make a private Xbox message bomber with custom Gamertags, so I need it to visit the messages tab and then look for the specified Gamertag and click it. So then it pulls up messages and I can fill everything in.

 

I can't find an answer to this question anywhere on the internet so I came here :)

 

Plz don't bully me if this is retarded :kek:


  • 0

#2

MexicanTobato
MexicanTobato
    Offline
    428
    Rep
    1905
    Likes

    Veteran

Posts: 1767
Threads: 191
Joined: Mar 05, 2017
Credits: 24

Seven years registered
#2

Hi,

 

In short: Can someone tell me the code so that my C# app scans webbrowser1 for text and then click the text

 

 

 

So I need my C# application to scan through Webbrowser1 for a certain piece of text and then click the text (programmatically). << The issue is I don't know the code for that

So for e.g. It looks for "HAUL" on Webbrowser1 and then clicks it. 

 

Why?

 

I'm trying to make a private Xbox message bomber with custom Gamertags, so I need it to visit the messages tab and then look for the specified Gamertag and click it. So then it pulls up messages and I can fill everything in.

 

I can't find an answer to this question anywhere on the internet so I came here :)

 

Plz don't bully me if this is retarded :kek:

Search for chromedriver tutorials ;)


  • 0

#3

NullCheats
NullCheats
Posts: 4254
Threads: 147
Joined: Sep 05, 2018
Credits: 4

Five years registered
#3

why dont you use selenium so much easier 


  • 0

Signature.gif

728_1.jpg


#4

J5ck
J5ck
    Offline
    13
    Rep
    70
    Likes

    Epic Gamer

  • PipPipPipPipPip
Posts: 204
Threads: 50
Joined: Jan 07, 2019
Credits: 0

Five years registered
#4

Search for chromedriver tutorials ;)

Don't know if this matters, but, the button I need it to press doesn't have an ID or anything like that. So that's why I need it to scan for the text and click the text. 


  • 0

#5

killerabgg
killerabgg
    Offline
    315
    Rep
    2177
    Likes

    slc-r.net

Posts: 1696
Threads: 349
Joined: Jan 31, 2015
Credits: 0

Eight years registered
#5

Enumerate the elements with the base class that is the element you are looking for and search for it.

var collection = webBrowser.Document.GetElementsByTagName("*CLASS*");

 

and stop using rainbow text please.


  • 1

8nqAFny.gif


#6

NullCheats
NullCheats
Posts: 4254
Threads: 147
Joined: Sep 05, 2018
Credits: 4

Five years registered
#6

Don't know if this matters, but, the button I need it to press doesn't have an ID or anything like that. So that's why I need it to scan for the text and click the text. 

that is why you use selenium or chrome driver and use Xpath


  • 0

Signature.gif

728_1.jpg


#7

BoliBerrys
BoliBerrys
    Offline
    251
    Rep
    909
    Likes

    AIOSerial <3

Posts: 3007
Threads: 164
Joined: Apr 12, 2015
Credits: 33

Eight years registered
#7

If you want to do Browser automation, check out Selenium.


  • 0

o9YHxIF.gif


#8

ScarFace0409
ScarFace0409
    Offline
    0
    Rep
    0
    Likes

    Member

  • PipPipPip
Posts: 37
Threads: 0
Joined: Feb 27, 2018
Credits: 0
Six years registered
#8

check GeckoFx


  • 0


 Users browsing this thread: