Skip to main content
Question

Test SDK: How to Select Row by Column Name and Value

  • Nov 15, 2023 3:46 PM UTC
  • 4 replies
  • 146 views
  • Translate All

I’m creating SDK tests and I need to select the row by column name and value. However, it throws error “Element is not interactable” when I use this: 

users.UserRoles.SelectRow("Role Name", "Anonymous"); 

or this:

users.UserRoles.SelectRow(users.UserRoles.Columns.Rolename, "Anonymous");

It only works with index: users.UserRoles.SelectRow(10);

Could someone please help me out?

 

4 replies

AaronB
Varsity II
Forum|alt.badge.img+1
  • Varsity II
  • Nov 15, 2023 4:48 PM UTC

Hello,
Both your first attempts should have worked, but here is a full example
This code should work:


PxLogin.LoginToDestinationSite();
User.OpenScreen();
User.Summary.Username.Select("admin");
User.Roles.SelectRow(User.Roles.Columns.Rolename, "Anonymous");
User.Roles.Row.Selected.SetTrue();
User.Save();

Translate

Yes, same as I have, but it doesn’t work from my side. Have I imported correct namespaces ?

using Controls.CheckBox;
using Core.Login;
using Core.TestExecution;

using Tests_ASC.Extensions;

Translate

AaronB
Varsity II
Forum|alt.badge.img+1
  • Varsity II
  • Nov 15, 2023 5:11 PM UTC

You should review your error in the log folder or in the compiler.
Looks good to me but your error says the page is not accessible. Ensure you are using the correct website and have it configured to use that same one.

Translate

Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • Dec 14, 2023 11:26 PM UTC

Hi @annanykolenko71 were you able to find a solution? Thank you!

Translate