我如何使用像这样的代码,但要通过自动方式将其编写
IJavaScriptExecutor js = chromeDriver as IJavaScriptExecutor;
var dataFromJS = (string)js.ExecuteScript("var content = document.getElementsByClassName('contentpagetop'[0].children[0].innerHTML;return content;");
MessageBox.Show(dataFromJS);
谢谢阅读!