-1
This code of mine takes an entire content specific to a site How to simulate the click of a button?
[Route("HomeController/Requisicao")] // Matches 'Products/Index'
public string Requisicao()
{
var result = "";
string path = "http://testedev-rpa.ddns.net";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(path);
httpWebRequest.ContentType = "application/json";
httpWebRequest.Method = "POST";
using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
{
streamWriter.Write(true);
streamWriter.Flush();
streamWriter.Close();
var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
result = streamReader.ReadToEnd();
}
}
return result;
}
Yeah, I’m using Selenium for this, but it’s giving me an error of the eviroment path of it, even though I’m downloading the Chrome driver
– Gabriel Falieri