Can't determine if a certain UITestControl exists in my web app

前端 未结 3 1348
清酒与你
清酒与你 2020-12-17 22:29

I\'m currently trying to help automate some coded UI tests using C# for a web application. A frequent problem I\'m encountering is that it can be extremely difficult to det

3条回答
  •  自闭症患者
    2020-12-17 23:21

    I am using tryfind() .. it is working fine.

    if (obj_webor.GenLink.TryFind())
    {
        logdata.WriteLine(obj_webor.GenInnerText + " Exist !");
    }
    else
    {
        logdata.WriteLine(obj_webor.GenInnerText + " Does Not Exist");
    }
    

    Earlier i was using obj_webor.GenLink.exist().. but is was giving error if it was control not existing and exception occurs. tryfind is ok

提交回复
热议问题