Question

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

  • 15 November 2023
  • 4 replies
  • 59 views

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

Userlevel 4
Badge +1

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();

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;

Userlevel 4
Badge +1

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.

Userlevel 7
Badge

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

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved