TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
bishop kumar
1.6k
155
647
how can webapi make scrapped?
Feb 5 2019 4:44 AM
automation web api easy make resouces and sample format
ChromeDriverService service = ChromeDriverService.CreateDefaultService();
// service.HideCommandPromptWindow = true;
var options = new ChromeOptions();
//options.AddArgument("--window-position=-32000,-32000");
var driver = new ChromeDriver(service, options);
driver.Navigate().GoToUrl("https://www.e-m.com/portal/Partner/login.aspx");
IWebElement query = driver.FindElement(By.Id("HomeContentPlaceHolder_txtLoginID"));
query = driver.FindElement(By.Id("HomeContentPlaceHolder_txtLoginID"));
query.SendKeys("xxxxxx");
query = driver.FindElement(By.Id("HomeContentPlaceHolder_txtPassword"));
query.SendKeys("yyyyyy");
driver.FindElement(By.XPath("//*[@id='HomeContentPlaceHolder_ckTermAndCon']")).Click();
driver.FindElement(By.Id("HomeContentPlaceHolder_btnSubmit")).Click();
driver.Navigate().GoToUrl("https://www.e-mudhra.com/portal/Partner/Reports/ApplicationProcessed.aspx");
query = driver.FindElement(By.Id("txtFromDate"));
query.SendKeys(emudra_date);
driver.FindElement(By.XPath("//*[@id='ui-datepicker-div']/div/div/select[1]/option[" + month + "]")).Click();
driver.FindElement(By.XPath("//*[@id='ui-datepicker-div']/div/div/select[2]/option[" + year + "]")).Click();
int milliseconds = 5000;
Thread.Sleep(milliseconds);
driver.FindElement(By.XPath("//*[@id='ui-datepicker-div']/table/tbody/tr[2]/td[1]/a")).Click();
driver.FindElement(By.Id("btnSearch")).Click();
milliseconds = 10000;
var click2 = driver.FindElementById("downloadLink").GetAttribute("href");//.Document.GetElementsByTagName("a");
var response =(new WebClient().DownloadString(click2));
//byte[] dddd = File.ReadAllBytes(click2);
Thread.Sleep(milliseconds);
driver.FindElement(By.Id("downloadLink")).Click();
Reply
Answers (
2
)
atom payment intergration
web api DelegatingHandler question?