-1

I'm building page objects for regression testing and there are a few views that incorporates a recycler view with list items and I have found one solution but I can't get it work. What I get is that "The name index doesn't exist in the current context"

What am I doing wrong here?

My code:

    Func<AppQuery, AppQuery> _listItem(int index) => e => e.Marked("text_left_icon_right_list_item_textview").Index(index);

    public SomethingPage(IApp app)
    {
        _app = app;
    }

    public void SelectSomething()
    {
        _app.Tap(_listItem(index));
    }

The code of the solution I found:

https://xamarinhelp.com/page-object-pattern-will-make-better-xamarin-ui-automation-tester/

0

I found what was wrong ^^ :P I had forgotten to put int index in the parentheses of public void SelectSomething()

0

Just a guess... but I believe you need to add int index as a parameter for the SelectSomething() method. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.