0
나는 웹 사이트에 가서 '문의하기'를 클릭하고 '쇼핑객에게 물어보세요'라는 단어를 검색하려고합니다. 검색 창. Selenium IDE에서 테스트를 다시 만들려고했지만 녹음 할 때 검색을 캡처하지 못했습니다. 나는 또한 잘못되고있는 것을 진단하기 위해 에러 로그에 접근하는 방법을 확신하지 못한다. 지금까지 내가 가진 : 대상 요소가 동일한 ID를 가진이 프레임 안에있는 동안 해당 페이지에, 같은 ID response
과 iframe
가셀레늄 : 상자를 검색 할 수 없습니다.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.Chrome;
namespace TestApplications
{
class Program
{
static void Main(string[] args)
{
IWebDriver driver = new ChromeDriver(@"C:\Library");
driver.Url = "http://www1.shoppersdrugmart.ca/en/Home";
var findContact = driver.FindElement(By.CssSelector("#Header > section.hdr-bar > div > div > menu > ul > li:nth-child(2) > a"));
findContact.Click();
driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(10));
var findAsk = driver.FindElement(By.CssSelector("#response"));
findAsk.SendKeys("text");
}
}
}