我想抓住与以下内容相似的东西:
IWebElement commentField = Regex.Match(driver.PageSource,"TextBoxComments$",RegexOptions.RightToLeft);
Where the TextBox has a variable that is updated each time the page is loaded, but since the page element always ends with TextBoxComments I can use that as a capture key. I want to then use this in an NUnit/SpecFlow test to then add a comment to the page, it worked in a test page but now that the element is more variable my test is failing. I m not sure what s the best way to capture this element and then be able to perform an opertation on it. Is there a better capture method or do I need to convert the Regex capture element somehow?