private static void ExtraerLibros(IWebDriver driver) { foreach (var url in GetCatalogoUrls().Skip(1)) { driver.Navigate().GoToUrl(url); Catalogo catalogo = new Catalogo(driver); var links = catalogo.ObtenerUrlLibros(); foreach (var link in links) { driver.Navigate().GoToUrl(link); DetalleLibro detalleLibro = new DetalleLibro(driver); using (var db = new AppData.AppContext()) { db.Libros.Add(detalleLibro.GetDetallesLibro()); db.SaveChanges(); } } } }