i am using selenium or webBrowser to navigate the web url. the weburl downloaded the txt file. instead of downloading a file i want the file data in a variable. Can anybody please help in this.
for eq url is "https://trends.google.com/trends/api/explore?hl=en-US&tz=-330&req=%7B%22comparisonItem%22:%5B%7B%22keyword%22:%22tsla%22,%22geo%22:%22US%22,%22time%22:%22today+1-m%22%7D,%7B%22keyword%22:%22bitcoin%22,%22geo%22:%22US%22,%22time%22:%22today+1-m%22%7D%5D,%22category%22:0,%22property%22:%22%22%7D&tz=-330"
code snippet :
tcs = new TaskCompletionSource<bool>();
wb.DocumentCompleted += documentCompletedHandler;
try
{
wb.Navigate(url.ToString());
// await for DocumentCompleted
await tcs.Task; ----> here adownloaded a file but i want the file data;
}
finally
{
wb.DocumentCompleted -= documentCompletedHandler;
}