Documente Academic
Documente Profesional
Documente Cultură
Selenium;
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Support.UI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace test
{
class Program
{
static string chrome =
System.Configuration.ConfigurationManager.AppSettings["chrome"];
static string user =
System.Configuration.ConfigurationManager.AppSettings["user"];
static string password =
System.Configuration.ConfigurationManager.AppSettings["password"];
static string url =
System.Configuration.ConfigurationManager.AppSettings["url"];
driver.Navigate().GoToUrl(url + "Credit/Index/1");
System.Threading.Thread.Sleep(3000);
devam.Click();
System.Threading.Thread.Sleep(4000);
driver.FindElement(By.Id("Amount")).SendKeys("500");
driver.FindElement(By.ClassName("btn-primary")).Click();
//-----------------------------------------------------
System.Threading.Thread.Sleep(5000);
WebDriverWait webDriverWait = new WebDriverWait(driver,
TimeSpan.FromSeconds(30));
webDriverWait.Until(x => x.FindElement(By.ClassName("btn-
primary")));
devam = driver.FindElementByClassName("btn-primary");
//driver.ExecuteScript("document.getElementsByClassName('btn-
primary').click()", new object[] { });
devam.Click();
//---------------------------------------------------------
System.Threading.Thread.Sleep(5000);
webDriverWait.Until(x =>
{
try
{
x.FindElement(By.ClassName("btn-primary"));
return true;
}
catch (Exception)
{
return false;
}
}
);
driver.FindElement(By.ClassName("btn-primary")).Click();
//devam.Click();
//---------------------------------------------------------
System.Threading.Thread.Sleep(8000);
}
}
}
}