public ESPNTeam() { StartBrowser(); url = ROSTER_URL; driver.Url = url; navigator = new ESPNNavigator(driver); }
public void NavigatorSwap() { var driver = new ChromeDriver(@"C:\Program Files") { Url = "https://fantasy.espn.com/football/team?leagueId=61483480&teamId=10&seasonId=2019" }; var navigator = new ESPNNavigator(driver); navigator.LogIn(); var table = navigator.GetTable(); var row = navigator.GetRow(table, 1); navigator.ClickRosterAction(row); Thread.Sleep(1000); row = navigator.GetRow(table, 10); navigator.ClickRosterAction(row); driver.Close(); }
public void JavascriptTest() { ChromeDriver driver = new ChromeDriver(@"C:/Program Files"); driver.Url = "https://fantasy.espn.com/football/team?leagueId=61483480&teamId=10"; var executor = (IJavaScriptExecutor)driver; /*for (int i = 0; i < 4; i++) * { * executor.ExecuteScript("window.scrollBy(0,200)"); * Thread.Sleep(1000); * } * driver.Close();*/ var navigator = new ESPNNavigator(driver); var table = navigator.GetTable(); var row = navigator.GetRow(table, 15); navigator.ScrollElementIntoView(row); row = navigator.GetRow(table, 1); navigator.ScrollElementIntoView(row); driver.Close(); }