【发布时间】:2020-05-16 15:05:04
【问题描述】:
我目前正在尝试自动化结帐流程。现在我被卡住了,网站上显示尺寸的按钮几乎相同,它们只是值不同
这就是为什么我想问我是否可以通过类 + 值等两个标准来区分它们。
代码:
using System;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
namespace selenium1
{
class MainClass
{
public static void Main(string[] args)
{
IWebDriver driver = new ChromeDriver();
driver.Navigate().GoToUrl("https://www.off---white.com/en-de/shopping/off-white-odsy-1000-sneakers-14760681");
IWebElement element = driver.FindElement(By.());
element.Click();
}
}
}
提前感谢您的帮助!
【问题讨论】:
标签: c# html selenium button automation