Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace NekretnineScraperTest
- {
- public class Oglas
- {
- public string Sifra { get; set; }
- public string Vrsta { get; set; }
- public string Naslov { get; set; }
- public string Tip { get; set; }
- public string Mesto { get; set; }
- public string Lokacija { get; set; }
- public string Opis { get; set; }
- public string Ulica { get; set; }
- public string Sobnost { get; set; }
- public double Kvadratura { get; set; }
- public double Cena { get; set; }
- public double CenaPoKvadratu { get; set; }
- public double Spratnost { get; set; }
- public double Sprat { get; set; }
- public string StanjeNekretnine { get; set; }
- public int GodinaIzgradnje { get; set; }
- public string Grejanje { get; set; }
- public double BrojKupatila { get; set; }
- public List<string> DodatneInformacije { get; set; }
- public List<string> Pomagala { get; set; }
- public Oglas(string sifra, string naslov, string vrsta, string tip, string mesto, string lokacija, string ulica, string opis, string sobnost, double kvadratura, double cena, double cenapokvadratu, double ukupnoSpratova, double sprat, string stanjeNekretnine, int godinaIzgradnje, string grejanje, double brojKupatila, List<string> dodatneInformacije, List<string> pomagala)
- {
- this.Sifra = sifra;
- this.Naslov = naslov;
- this.Vrsta = vrsta;
- this.Tip = tip;
- this.Opis = opis;
- this.Mesto = mesto;
- this.Lokacija = lokacija;
- this.Ulica = ulica;
- this.Sobnost = sobnost;
- this.Kvadratura = kvadratura;
- this.Cena = cena;
- this.CenaPoKvadratu = cenapokvadratu;
- this.Spratnost = ukupnoSpratova;
- this.Sprat = sprat;
- this.StanjeNekretnine = stanjeNekretnine;
- this.GodinaIzgradnje = godinaIzgradnje;
- this.Grejanje = grejanje;
- this.BrojKupatila = brojKupatila;
- this.DodatneInformacije = dodatneInformacije;
- this.Pomagala = pomagala;
- }
- public Oglas()
- {
- this.DodatneInformacije = new List<string>();
- this.Pomagala = new List<string>();
- }
- public void AddProperties(List<string> Properties)
- {
- string[] splitter;
- List<string> pomagala = new List<string>();
- string key, value;
- foreach (string property in Properties)
- {
- splitter = property.Split(':');
- key = splitter[0].TrimStart().TrimEnd();
- value = "";
- try
- {
- if (splitter[1] != null)
- {
- value = splitter[1].TrimStart().TrimEnd();
- }
- }
- catch (Exception)
- {
- }
- if (key.Contains("ล ifra"))
- {
- this.Sifra = value;
- }
- else if (key.Equals("Vrsta"))
- {
- this.Vrsta = value;
- }
- else if (key.Equals("Tip"))
- {
- this.Tip = value;
- }
- else if (key.Equals("Mesto"))
- {
- this.Mesto = value;
- }
- else if (key.Equals("Lokacija"))
- {
- this.Lokacija = value;
- }
- else if (key.Equals("Ulica"))
- {
- this.Ulica = value;
- }
- else if (key.Equals("Sobnost"))
- {
- this.Sobnost = value;
- }
- else if (key.Equals("Kvadratura"))
- {
- if (String.IsNullOrEmpty(value))
- {
- this.Kvadratura = -1;
- }
- else
- {
- this.Kvadratura = Math.Round(Double.Parse(value.Substring(0, value.Length - 2)), 2);
- }
- }
- else if (key.Equals("Cena"))
- {
- if (String.IsNullOrEmpty(value))
- {
- this.Cena = -1;
- }
- else
- {
- this.Cena = Math.Round(Double.Parse(value.Substring(0, value.Length - 1)), 2);
- }
- }
- else if (key.Equals("Cena po m2"))
- {
- if (String.IsNullOrEmpty(value))
- {
- this.CenaPoKvadratu = -1;
- }
- else
- {
- this.CenaPoKvadratu = Math.Round(Double.Parse(value.Substring(0, value.Length - 1)), 2);
- }
- }
- else if (key.Equals("Sprat"))
- {
- if (String.IsNullOrEmpty(value))
- {
- this.Spratnost = -1;
- this.Sprat = -1;
- }
- else
- {
- this.Spratnost = Double.Parse(value.Trim().Split(new string[] { "od" }, StringSplitOptions.None)[1]);
- this.Sprat = Double.Parse(value.Trim().Split(new string[] { "od" }, StringSplitOptions.None)[0]);
- }
- }
- else if (key.Equals("Stanje nekretnine"))
- {
- this.StanjeNekretnine = value;
- }
- else if (key.Contains("Godina"))
- {
- if (String.IsNullOrEmpty(value))
- {
- this.GodinaIzgradnje = -1;
- }
- else
- {
- this.GodinaIzgradnje = Int32.Parse(value);
- }
- }
- else if (key.Equals("Grejanje"))
- {
- this.Grejanje = value;
- }
- else if (key.Equals("Broj kupatila"))
- {
- if (String.IsNullOrEmpty(value))
- {
- this.BrojKupatila = -1;
- }
- else
- {
- this.BrojKupatila = Int32.Parse(value);
- }
- }
- else if (key.Equals("Pomagala"))
- {
- if (!String.IsNullOrEmpty(value))
- {
- this.Pomagala.Add(value);
- }
- }
- else if (key.Contains("Rampa"))
- {
- this.Pomagala.Add(key);
- }
- else if (key.Equals("Lift"))
- {
- this.Pomagala.Add(key);
- }
- }
- }
- }
- }
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace NekretnineScraperTest
- {
- public class Scraper
- {
- //public TipOglasa TipOglasa { get; set; } //Ovo ide u model
- public WebBrowser Browser { get; set; }
- public Scraper(WebBrowser browser)
- {
- this.Browser = browser;
- }
- /// <summary>
- /// Navigatuje se na oglas sa tom sifrom
- /// </summary>
- /// <param name="pageUrl"></param>
- /// <param name="sifraOglasa"></param>
- /// <returns></returns>
- public void FindFullOglasUrl(string sifraOglasa)
- {
- Browser.Document.GetElementById("id_search").Children[0].SetAttribute("value", sifraOglasa);
- Browser.Document.GetElementById("id_search").Children[1].InvokeMember("Click");
- }
- /// <summary>
- /// Vraca Oglas sa osnovnim podacima
- /// </summary>
- public Oglas ScrapeBasicInfo()
- {
- Oglas basicInfoOglas = new Oglas();
- List<string> BasicInfo = new List<string>();
- var Divs = Browser.Document.GetElementsByTagName("div");
- foreach (HtmlElement div in Divs)
- {
- string className = div.OuterHtml;
- if (className.Contains("property_details_info"))
- {
- if (div.InnerHtml != null && div.InnerHtml != "")
- {
- BasicInfo.Add(div.InnerText);
- }
- }
- }
- BasicInfo.RemoveRange(0, 4);
- basicInfoOglas.AddProperties(BasicInfo);
- return basicInfoOglas;
- }
- // Prva faza - Ukucaj sifru u search box :) [x]
- // Druga faza - popuni BasicProperties [x]
- // Treca faza - Uzmi naslov, opis, i dodatne informacije
- }
- }
- using HtmlAgilityPack;
- using Microsoft.Win32;
- using OpenQA.Selenium;
- using OpenQA.Selenium.Chrome;
- using OpenQA.Selenium.PhantomJS;
- using OpenQA.Selenium.Support.UI;
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Diagnostics;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace NekretnineScraperTest
- {
- public partial class Form1 : Form
- {
- public string currentPageOnOglasiRs = "DodajProdaju";
- HtmlAgilityPack.HtmlDocument htmlDoc = new HtmlAgilityPack.HtmlDocument();
- //ChromeDriver driver = new ChromeDriver();
- Scraper scraper;
- bool navigated = false;
- public Form1()
- {
- //SetBrowserFeatureControl();
- InitializeComponent();
- webBrowser1.ScriptErrorsSuppressed = true;
- scraper = new Scraper(webBrowser1);
- //// 4824efef-f41f-4969-a0af-4d6599714c75 - pozicionira se na Prodaju
- //webBrowser1.Navigate("https://www.oglasi.rs/predaja-oglasa/4824efef-f41f-4969-a0af-4d6599714c75");
- webBrowser1.Navigate("http://nekretnine-novisad.rs/nekretnine/stan.php");
- //htmlDoc.OptionFixNestedTags = true;
- //Console.Write("asdasd");
- //IWebDriver driver = new ChromeDriver();
- //driver.Navigate().GoToUrl("https://www.oglasi.rs/predaja-oglasa");
- //driver.Manage().Window.Minimize();
- //driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(30);
- //OglasiRsAlgorithm();
- //driver.Quit();
- //IWebDriver driver = new ChromeDriver();
- //driver.Manage().Window.Maximize();
- //driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(30);
- //driver.Navigate().GoToUrl("https://images.google.com/");
- //driver.FindElement(By.XPath("//*[@id='qbi']")).Click();
- //driver.FindElement(By.XPath("//*[@id='qbug']/div/a")).Click();
- //IWebElement fileUpload = driver.FindElement(By.XPath("//*[@id='qbfile']"));
- //fileUpload.SendKeys("D:\\Pictures\\6PM.png");
- //driver.FindElement(By.Id("username")).SendKeys("tnekr77@hotmail.com");
- //driver.FindElement(By.Id("LoginPswd")).SendKeys("tnekretnine77");
- //driver.FindElement(By.XPath("//*[@id='content']/div[2]/div[1]/div/div[2]/div/form/fieldset[2]/div/button")).Click();
- //driver.FindElement(By.XPath("//*[@id='AdvertForm']/fieldset/div/div[2]/div/div[1]/div[1]/a")).Click();
- //driver.FindElement(By.XPath("//*[@id='AdvertForm']/fieldset/div/div[2]/div/div[2]/div[1]/a/span")).Click();
- //driver.FindElement(By.XPath("//*[@id='AdvertForm']/fieldset/div/div[2]/div/div[2]/div[1]")).Click();
- ////Thread.Sleep(2000);
- //driver.FindElement(By.XPath("//*[@id='AdvertForm']/div/fieldset[5]/div[2]/div/div[1]/span/input")).Click();
- // Nadji Dom - ide lagano, samo trebaju da se pokupe podaci, naprave Enumi ili dictionaryiji za svaki Dropdown, da se zna sta je vrednost i to, i slike mogu biti prob
- // Realitica - problem pravi jedino prva strana, gde se bira kategorija, vrsta, drzava i to, ali dobra stvar je sto moze preko url-a da se pristupi, znaci mogu da buildujem url na osnovu parametara
- // Potrebno pitati samo da li se nesto ne popunjava ili kako bi mogao lakse da automatizujem, kasnije ide opusteno (hope so...)
- // Bice potreban Queue koji ce biti punjen modelima, i samo ce se cuvati sledece vreme, znaci kad se klikne submit, uzme se prvi koji treba da bude obradjen, tj najblize vreme trenutnom
- // I kada dodje to vreme, ti boxovi postanu disabled i queuje se taj koji treba
- // Mozda cak i da ne bude queue, nego dictionary, da su kljucevi vremena, a vrednosti Modeli koji trebaju da se objave i na koji sajt
- // Bolje odvojiti na koji sajt da se objavi, nekako sklopiti to sve u strukturu (Model za objavu, vreme, koji sajt)
- // Mozda da pored svakog reda bude cancel, da se ne zajebu
- // Kad se pokrene app, kada pokrenu odredjeni proces tj oglas koji treba da se svuce sa njihovog sajta, program pocinje da svlaci sve oglase koji su zadati, i strpa ih u neki txt i cuva ih u listi
- // Tako da kad dodje vreme samo ih objavi iz liste, u txt se cuva zbog sigurnosnih razloga, ukoliko nestane struje i slicno.
- // Pri downloadu potrebno sacuvati sve slike u folder koji ce imati Sifru tog entiteta.
- // Napraviti funkcije, koje ce da rade sve te foreacheve, ti samo prosledis tagname i atribut koji treba da nadje, u slucaju da treba da trazi po vrednosti, imati novu funkciju
- }
- private void SetBrowserFeatureControlKey(string feature, string appName, uint value)
- {
- using (var key = Registry.CurrentUser.CreateSubKey(
- String.Concat(@"Software\Microsoft\Internet Explorer\Main\FeatureControl\", feature),
- RegistryKeyPermissionCheck.ReadWriteSubTree))
- {
- key.SetValue(appName, (UInt32)value, RegistryValueKind.DWord);
- }
- }
- private void SetBrowserFeatureControl()
- {
- // http://msdn.microsoft.com/en-us/library/ee330720(v=vs.85).aspx
- // FeatureControl settings are per-process
- var fileName = System.IO.Path.GetFileName(Process.GetCurrentProcess().MainModule.FileName);
- // make the control is not running inside Visual Studio Designer
- if (String.Compare(fileName, "devenv.exe", true) == 0 || String.Compare(fileName, "XDesProc.exe", true) == 0)
- return;
- SetBrowserFeatureControlKey("FEATURE_BROWSER_EMULATION", fileName, GetBrowserEmulationMode()); // Webpages containing standards-based !DOCTYPE directives are displayed in IE10 Standards mode.
- SetBrowserFeatureControlKey("FEATURE_AJAX_CONNECTIONEVENTS", fileName, 1);
- SetBrowserFeatureControlKey("FEATURE_ENABLE_CLIPCHILDREN_OPTIMIZATION", fileName, 1);
- SetBrowserFeatureControlKey("FEATURE_MANAGE_SCRIPT_CIRCULAR_REFS", fileName, 1);
- SetBrowserFeatureControlKey("FEATURE_DOMSTORAGE ", fileName, 1);
- SetBrowserFeatureControlKey("FEATURE_GPU_RENDERING ", fileName, 1);
- SetBrowserFeatureControlKey("FEATURE_IVIEWOBJECTDRAW_DMLT9_WITH_GDI ", fileName, 0);
- SetBrowserFeatureControlKey("FEATURE_DISABLE_LEGACY_COMPRESSION", fileName, 1);
- SetBrowserFeatureControlKey("FEATURE_LOCALMACHINE_LOCKDOWN", fileName, 0);
- SetBrowserFeatureControlKey("FEATURE_BLOCK_LMZ_OBJECT", fileName, 0);
- SetBrowserFeatureControlKey("FEATURE_BLOCK_LMZ_SCRIPT", fileName, 0);
- SetBrowserFeatureControlKey("FEATURE_DISABLE_NAVIGATION_SOUNDS", fileName, 1);
- SetBrowserFeatureControlKey("FEATURE_SCRIPTURL_MITIGATION", fileName, 1);
- SetBrowserFeatureControlKey("FEATURE_SPELLCHECKING", fileName, 0);
- SetBrowserFeatureControlKey("FEATURE_STATUS_BAR_THROTTLING", fileName, 1);
- SetBrowserFeatureControlKey("FEATURE_TABBED_BROWSING", fileName, 1);
- SetBrowserFeatureControlKey("FEATURE_VALIDATE_NAVIGATE_URL", fileName, 1);
- SetBrowserFeatureControlKey("FEATURE_WEBOC_DOCUMENT_ZOOM", fileName, 1);
- SetBrowserFeatureControlKey("FEATURE_WEBOC_POPUPMANAGEMENT", fileName, 0);
- SetBrowserFeatureControlKey("FEATURE_WEBOC_MOVESIZECHILD", fileName, 1);
- SetBrowserFeatureControlKey("FEATURE_ADDON_MANAGEMENT", fileName, 0);
- SetBrowserFeatureControlKey("FEATURE_WEBSOCKET", fileName, 1);
- SetBrowserFeatureControlKey("FEATURE_WINDOW_RESTRICTIONS ", fileName, 0);
- SetBrowserFeatureControlKey("FEATURE_XMLHTTP", fileName, 1);
- }
- private UInt32 GetBrowserEmulationMode()
- {
- int browserVersion = 7;
- using (var ieKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Internet Explorer",
- RegistryKeyPermissionCheck.ReadSubTree,
- System.Security.AccessControl.RegistryRights.QueryValues))
- {
- var version = ieKey.GetValue("svcVersion");
- if (null == version)
- {
- version = ieKey.GetValue("Version");
- if (null == version)
- throw new ApplicationException("Microsoft Internet Explorer is required!");
- }
- int.TryParse(version.ToString().Split('.')[0], out browserVersion);
- }
- UInt32 mode = 11000; // Internet Explorer 11. Webpages containing standards-based !DOCTYPE directives are displayed in IE11 Standards mode. Default value for Internet Explorer 11.
- switch (browserVersion)
- {
- case 7:
- mode = 7000; // Webpages containing standards-based !DOCTYPE directives are displayed in IE7 Standards mode. Default value for applications hosting the WebBrowser Control.
- break;
- case 8:
- mode = 8000; // Webpages containing standards-based !DOCTYPE directives are displayed in IE8 mode. Default value for Internet Explorer 8
- break;
- case 9:
- mode = 9000; // Internet Explorer 9. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode. Default value for Internet Explorer 9.
- break;
- case 10:
- mode = 10000; // Internet Explorer 10. Webpages containing standards-based !DOCTYPE directives are displayed in IE10 mode. Default value for Internet Explorer 10.
- break;
- default:
- // use IE11 mode by default
- break;
- }
- return mode;
- }
- private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
- {
- if (webBrowser1.Url.ToString() == "http://www.nadjidom.com/sr/login")
- {
- LoginToNadjiDom();
- }
- else if (webBrowser1.Url.ToString() == "http://www.nadjidom.com/sr/my-real-estate-ads&action=add")
- {
- if (webBrowser1.ReadyState == WebBrowserReadyState.Complete)
- {
- AddPodaciNadjiDom();
- }
- }
- else if (webBrowser1.Url.ToString() == "http://nekretnine-novisad.rs/nekretnine/stan.php")
- {
- if (webBrowser1.ReadyState == WebBrowserReadyState.Complete)
- {
- scraper.FindFullOglasUrl("424766");
- }
- }
- else if (webBrowser1.Url.ToString().Contains("nekretnina") && !navigated)
- {
- if (webBrowser1.ReadyState == WebBrowserReadyState.Complete)
- {
- string urlNekretnine = webBrowser1.Url.ToString();
- string firstPart = urlNekretnine.Substring(0, 28);
- string secondPart = urlNekretnine.Substring(39);
- string fullPath = firstPart + secondPart;
- navigated = true;
- webBrowser1.Navigate(fullPath);
- }
- }
- else if (!webBrowser1.Url.ToString().Contains("/nekretnine/nekretnina/") && navigated)
- {
- if (webBrowser1.ReadyState == WebBrowserReadyState.Complete)
- {
- Oglas basicInfoOglas = scraper.ScrapeBasicInfo();
- }
- }
- //else if (webBrowser1.Url.ToString() == "https://www.oglasi.rs/oglasi/nekretnine")
- //{
- // if (webBrowser1.ReadyState == WebBrowserReadyState.Complete)
- // {
- // var elements = webBrowser1.Document.GetElementsByTagName("a");
- // foreach (HtmlElement element in elements)
- // {
- // if (element.InnerHtml.Contains("Dodaj oglas"))
- // {
- // element.InvokeMember("Click");
- // currentPageOnOglasiRs = "DodajProdaju";
- // break;
- // }
- // }
- // }
- //}
- //else if (webBrowser1.Url.ToString().Contains("https://www.oglasi.rs/predaja-oglasa"))
- //{
- // htmlDoc.LoadHtml(webBrowser1.DocumentText);
- // HtmlNode node = htmlDoc.DocumentNode.SelectSingleNode("//*[@id='AdvertForm']/fieldset/div/div[2]/div/div[2]/div[1]/a");
- // Console.Write("asdasd");
- // //if (webBrowser1.ReadyState == WebBrowserReadyState.Complete)
- // //{
- // // //AddPodaciOglasiRs();
- // // InjectRawOglasiRs();
- // //}
- //}
- }
- //private void InjectRawOglasiRs()
- //{
- // var elements = webBrowser1.DocumentText;
- // // foreach (HtmlElement item in elements)
- // // {
- // // if (item.InnerHtml.Contains("getCategoryTitle"))
- // // {
- // // item.InnerHtml = "Stanova (Nekretnine, Prodaja)";
- // // break;
- // // }
- // // }
- // Console.WriteLine("desi");
- //}
- //private void AddPodaciOglasiRs()
- //{
- // var elements = webBrowser1.Document.GetElementsByTagName("label");
- // //if (currentPageOnOglasiRs == "DodajProdaju")
- // //{
- // // foreach (HtmlElement element in elements)
- // // {
- // // if (currentPageOnOglasiRs == "DodajProdaju")
- // // {
- // // if (element.InnerHtml.Contains("Prodaja"))
- // // {
- // // currentPageOnOglasiRs = "DodajStan";
- // // element.InvokeMember("Click");
- // // break;
- // // }
- // // }
- // // }
- // //}
- // //var elementsRefreshed = webBrowser1.Document.GetElementsByTagName("a");
- // foreach (HtmlElement element in elements)
- // {
- // if (element.InnerHtml != null && element.InnerHtml.Contains("stanova"))
- // {
- // element.Children[1].InvokeMember("click");
- // break;
- // }
- // }
- //}
- //private void OglasiRsAlgorithm()
- //{
- // driver.Url = "https://www.oglasi.rs/predaja-oglasa/4824efef-f41f-4969-a0af-4d6599714c75";
- // driver.Navigate();
- // var source = driver.PageSource;
- // // Uloguj se
- // driver.FindElement(By.Id("username")).SendKeys("tnekr77@hotmail.com");
- // driver.FindElement(By.Id("LoginPswd")).SendKeys("tnekretnine77");
- // driver.FindElement(By.XPath("//*[@id='content']/div[2]/div[1]/div/div[2]/div/form/fieldset[2]/div/button")).Click();
- // // Idi na Stanovi (nekretnine)
- // driver.FindElementByXPath("//*[@id='AdvertForm']/fieldset/div/div[2]/div/div[2]/div[1]/a").Click();
- // driver.Manage().Window.Maximize();
- // // Biranje lokacije
- // driver.FindElementByXPath("//*[@id='location_selection_anchor']/div/div[2]/div[1]/div/span/button[2]").Click();
- // // Odaberi Novi sad
- // driver.FindElementByXPath("//*[@id='location_selection_anchor']/div/div[2]/div[1]/div/div/div/div/ul/li[98]/a").Click();
- // // Odaberi Budisavu
- // driver.FindElementByXPath("//*[@id='location_selection_anchor']/div/div[2]/div[1]/div/div/div/div/ul/li[2]/a").Click();
- // // Odaberi sobnost
- // var Sobnost = driver.FindElementById("AdvertForm_fldsobnost");
- // var selectedElement = new SelectElement(Sobnost);
- // Thread.Sleep(1000);
- // selectedElement.SelectByText("Jednosoban");
- //}
- private void UploadPhotoTest()
- {
- var elements = webBrowser1.Document.GetElementsByTagName("input");
- foreach (HtmlElement element in elements)
- {
- // If there's more than one button, you can check the
- //element.InnerHTML to see if it's the one you want
- var type = element.GetAttribute("type").ToString();
- if (type == "file")
- {
- timer1.Interval = 3000;
- timer1.Start();
- element.InvokeMember("click");
- }
- }
- }
- private void LoginToNadjiDom()
- {
- webBrowser1.Document.GetElementById("login_username").InnerText = "tnekr77@hotmail.com";
- webBrowser1.Document.GetElementById("login_password").InnerText = "tnekretnine77";
- webBrowser1.Document
- .GetElementsByTagName("input")
- .GetElementsByName("login")[0]
- .InvokeMember("click");
- }
- private void AddPodaciNadjiDom()
- {
- webBrowser1.Document.GetElementById("id_ad_type").SetAttribute("value", "1");
- webBrowser1.Document.GetElementById("price").InnerText = "2000";
- }
- private void timer1_Tick(object sender, EventArgs e)
- {
- timer1.Stop();
- SendKeys.SendWait("\"D:\\Pictures\\6PM.png\" \"D:\\Pictures\\6bas.jpg\"");
- SendKeys.SendWait("{TAB 2}");
- SendKeys.SendWait("{ENTER}");
- }
- private void button1_Click(object sender, EventArgs e)
- {
- //driver.Quit();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement