Visual Studio 2010で警告メッセージが表示されます。「フィールドは割り当てられません」。 実行時にフィールドを割り当てたWebdriver PageFactoryを使用しますが、どうすればこのメッセージを抑制できますか?ここ Webdriver PageFactoryを使用して、フィールドに警告が割り当てられない
はコードのサンプルです:public class VideoInfo
{
[FindsBy(How = How.ClassName, Using = "detailsTitle")]
private IWebElement _videoInfoDetailsTitle; //Here is got the warning message
public VideoInfo(IWebDriver webDriver)
{
PageFactory.InitElements(webDriver, this); //Assigen the field
}
}
あなたの現在のセットアップで "それを修正する" ことはできません。ただし、必要に応じて警告を抑制することができます。 – Styxxy
あなたは正しいです、私は私の投稿を編集:) 10x。 – Kaldi