1
need to access this site https://free-proxy-list.net/ and select 8080 port option. Any hint?
Abs
1
need to access this site https://free-proxy-list.net/ and select 8080 port option. Any hint?
Abs
0
I was able to select the amount you need, despite the select
do not have id, I made a "Pog" to validate by InnerText
but, the site has not yet applied the selected value to the list, I could not identify what triggers the filter.
Follows the code:
public partial class Form3 : Form
{
public Form3()
{
InitializeComponent();
}
private void Form3_Load(object sender, EventArgs e)
{
webBrowser1.Navigate("https://free-proxy-list.net/");
}
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
var colecao = ((WebBrowser)sender).Document.All.Cast<HtmlElement>().ToList();
HtmlElement elemento = colecao.Find(p => p.TagName.ToLower() == "select" && p.InnerText.StartsWith("All"));
elemento.SetAttribute("value", "8080");
}
}
didn’t work here. Gave error "Additional information: Object reference not set for an instance of an object." Setattribute("value", "8080");
puts to debug, a breakpoint, and see if the variable "element" is not null... check the Wb event, it has to be the "documentCompleted"
Code changed, here also had stopped working, try again
the variable "element" is null
Now the combo appears selected with "8080", but does not apply the filter
yes, that’s what I wrote and I couldn’t do, because I couldn’t find the one that shoots the filter
Browser other questions tagged c# webbrowser
You are not signed in. Login or sign up in order to post.
Do you want, in the select you have at the bottom of the page, to choose the correct 8080 ? has a difficulty there that the element has no id or name but we will try
– Rovann Linhalis
You want to copy the ip on the line where port 8080 is to a string?
– Guilherme Nascimento
That’s right. I want to use select at the bottom of the page and choose port 8080.
– pleonardomv