private void çek_Click(object sender, EventArgs e) { // Image image = Image.FromFile(@"C:\Users\Sau\Desktop\Dmp-Wr6WwAEQPtp.jpg"); IWebElement element = driver.FindElement(By.Id("gsc_prf_pup-img")); String src = element.GetAttribute("src"); Console.WriteLine(src); label5.Text = src; Thread.Sleep(5000); Thread.Sleep(2500); var request = WebRequest.Create(src); using (var response = request.GetResponse()) using (var stream = response.GetResponseStream()) { profil.Image = Bitmap.FromStream(stream); } }
OpenQA.Selenium.NoSuchElementException: 'no such element: Unable to locate element: {"method":"css selector","selector":"#gsc_prf_pup\-img"} (Session info: chrome=127.0.0.1)'
var element = driver.FindElement(By.TagName("img")); string imageSrc = element.GetAttribute("src")
IWebElement logo = driver.findElement(By.cssSelector(".forum-logo")); String logoSRC = logo.getAttribute("src");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)