Selenium Web Driver is good option for tasks like that.
- Open Solution Explorer.
- Right Click on your project.
- Select Manage NuGet Packages..
- Browse and install these two :
Selenium.Chrome.WebDriver
and Selenium.WebDriver
.
- You have just installed selenium to your project!
So now, we need to create a driver service, and find needed elements in our website.
As far as i see, filenames are stored as a span class named signalFieldValue_03700093
.
But "Last Modified infos" are stored under this class too, i needed to skip "Last Modified infos" using the code below:
bool skip = false;
List<string> myFiles = new List<string>();
ChromeDriverService service = ChromeDriverService.CreateDefaultService();
ChromeOptions option = new ChromeOptions();
var driver = new ChromeDriver(service, option);
driver.Url = "https://1drv.ms/f/s!AtXoQFW327DIyMwPjZhmauUCSSHXUA";
driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
foreach (IWebElement element in driver.FindElements(By.XPath("//span[@class='signalFieldValue_03700093']")))
{
if (!skip)
{
myFiles.Add(element.Text);
skip = true;
}
else
skip = false;
}
As a result, we have our filenames in string array named myFiles
.
Hope this helps!
Core Package 1.0.0 (old).zip
andCore Package 1.1.0.zip
are enough? – isydmr