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 type
Xamarin.UITest.Queries.AppWebQuery'
Cannot implicitly convert type Xamarin.UITest.Queries.AppQuery' to
Xamarin.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.
Regards,
Supradip
Answers
Hi,
Can anyone please respond to this?
Its bit urgent at this stage.
Thanks a ton!
Regards,
Supradip
@SupradipDey.7257 Got?
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>