I want to build a bot to bets roulette with c#, I'm using selenium to find the numbers and click on them. I'm having 2 problems, the first problem is when I inspect for numbers game screen not visible in the inspection screen chromedriver inspection, normal chrome inspect the second problem I tried firefox instead of chrome, all things looks fine but when I try find by XPath I'm getting this error
OpenQA.Selenium.NoSuchElementException: 'Unable to locate element: /html/body/div[4]/div/div/div/div2/div/div[6]/div2/div/div2/div/div1/div/div1/div/svg/g/rect[20]'
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
IWebDriver chrome = new ChromeDriver();
IWebDriver firefox = new FirefoxDriver();
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
chrome.FindElement(By.XPath("/html/body/div[4]/div/div/div/div[2]/div/div[6]/div[2]/div/div[2]/div/div[1]/div/div[1]/div/svg/g/rect[20]")).Click();
}
private void button2_Click(object sender, EventArgs e)
{
chrome.Navigate().GoToUrl("https://tulipbet328.com/");
}
I just want to click on any number