Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to click on the phone (subgrid record header) phone number #1415

Open
kchinmay07 opened this issue Apr 8, 2024 · 5 comments
Open

How to click on the phone (subgrid record header) phone number #1415

kchinmay07 opened this issue Apr 8, 2024 · 5 comments
Labels

Comments

@kchinmay07
Copy link

kchinmay07 commented Apr 8, 2024

Question

What is your question?
phone

after successful login Dynamics 365
i searched a particular record using xrmApp.Grid.Search("datum") and now i want to click on "Main phone" that is 425-555-0158,

which command i should use, can someone please help.

@Shakevg
Copy link
Contributor

Shakevg commented Apr 8, 2024

kchinmay07 This is no such method, but you can implement it:

 public void ClickCell(int rowIndex, int columnIndex)
 {
     var gridContainerXPath = AppElements.Xpath[AppReference.Grid.Container];
     var cellXpath = gridContainerXPath + "//*[@row-index='{0}']//*[@aria-colindex='{1}']";
     var cellLocator = By.XPath(string.Format(cellXpath, rowIndex, columnIndex);
     var cell = GridContainer.Control.WaitUntilAvailable(cellLocator),
         $"An error occurs trying to get control on the record {rowIndex} and cell at position {columnIndex}");
     cell.Click();
     Driver.WaitForTransaction();
 }

Where rowIndex and columnIndex indexes from 0.

@kchinmay07
Copy link
Author

kchinmay07 commented Apr 8, 2024

i am using EASYREPRO FRAMEWORK, visual studio

image

Once i search datum, in front of me only 1 record is visible

and now i want to click on main phone only( as service request is generated under this only.)

@Shakevg
Copy link
Contributor

Shakevg commented Apr 8, 2024

kchinmay07 As I answered Framework doesn't contain such a feature, you can implement locally or contribute and add such functionality

@kchinmay07
Copy link
Author

can you write the full command

@krishnacs1993
Copy link

@kchinmay07 as @Shakevg answered, there is no command in EasyRepro to click on the phone number you are highlighting in the screenshot. You need to write code in Selenium and C# to handle this behavior. You can use the code provided by @Shakevg .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants