Webページを自動化しています。リンクをキャプチャしてファイルに保存しました。
Link Url_0="gmail.com"
Link Url_1="ymail.com"
Link Url_2="hotmail.com"
Link Url_3="outlook.com"
以下のステートメントは、各URLをクリックします。
HomePage.Url_0.Click();//Homepage is the Class name
これらのURLを1つずつクリックしたい。だから私はforループを使っています。
for(int i=0;i<3;i++)
{
String url=String.Format("Url_{0}",i);
HomePage.url.Click(); //This is throwing me error (I think that this is not correct way to do.)
Sleep(2000);
}
どうすればここに進むことができますか?これはどのような方法で行うことができますか?どんな助けでも大歓迎です。