Trying to reinitialize the AppQuery object

I have tried following code -

static Func<AppQuery, AppWebQuery> LoginButton = x => x.Class("UIWebView").Css("INPUT#main_1_mainform_0_LogOnButton");
static Func<AppQuery, AppWebQuery> SalesTab = q => q.Marked("");

The first segment in this source works like charm. However the second line in the above reveals following two errors -

Cannot convert lambda expression' to non-delegate typeXamarin.UITest.Queries.AppWebQuery'
Cannot implicitly convert type Xamarin.UITest.Queries.AppQuery' toXamarin.UITest.Queries.AppWebQuery'

Any idea as how to solve this? I want the element as object named SalesTab which I will use in the code accordingly.



  • Hi,

    Can anyone please respond to this?

    Its bit urgent at this stage.

    Thanks a ton!


  • NateVargheseNateVarghese USUniversity ✭✭
    edited March 2017
  • jrousselljroussell MXMember
    Any solución?
  • JuanPabloSillerJuanPabloSiller USMember ✭✭

    static Func<AppQuery, AppWebQuery> SalesTab = q => q.Marked("");

    q.Marked returns AppQuery not AppWebQuery. Css will return AppWebQuery but Marked will return a simple AppQuery, the error is telling you that your Func is expecting an AppWebQuery as the result but instead you are returning an AppQuery.

    Change it to
    static Func<AppQuery, AppQuery>

Sign In or Register to comment.