microsoft / EasyRepro

Automated UI testing API for Dynamics 365
MIT License
522 stars 289 forks source link

CommandBar is not responding to any Click Events/Commands #740

Open joesfshin13 opened 4 years ago

joesfshin13 commented 4 years ago

Out of the box project all tests that interact with the CommandBar are failing. Especially anything with "New" - Any help would be appreciated this is on a New D365 Implementation from scratch mostly Out of The Box functionality so far.

joesfshin13 commented 4 years ago

I have tried RelatedGrid as well but seem I still get a dreaded null exception error. Coming from the browserCommand . Any help appreciated or suggestions

AngelRodriguez8008 commented 4 years ago

Maybe are you running the "Classic Web (XrmBrowser)" tests in an UCI environment?

joesfshin13 commented 4 years ago

Nope - just seems not to find the element

joesfshin13 commented 4 years ago

looking for any or possible recommendations

AngelRodriguez8008 commented 4 years ago

Paste one test that you run and the error please.

joesfshin13 commented 4 years ago

1 2

joesfshin13 commented 4 years ago

all other tests seem to be running fine its just related to the CommadBar tests - New, delete... etc all get the same error message

AngelRodriguez8008 commented 4 years ago

Sorry I can not reproduce the error this tests are working fine for me. Try the latest version of 'develop' branch.

Thanks & br

joesfshin13 commented 4 years ago

Follow up question to my issue - could 8x8 integration be causing the issues without being able to click on "New" from CommandBar

AngelRodriguez8008 commented 4 years ago

I didn't know what "8x8 integration" is or does. I guest is this one "8x8 integration". If this tool change the standard structure of the html, yes it is posible that it is the cause.

to check that Open the developer pane (F12) search in Elements (Ctrl+F) for the follow XPaths:

1. You should be able to find one the Ribbon:
    (a) In the Form: //ul[contains(@data-lp-id,'commandbar-Form')]
or:
    (b) In the Views:  //ul[contains(@data-lp-id,'commandbar-HomePageGrid')]
or:
    (c) you get the error "Unable to find the ribbon." in your EasyRepro tests;

2. And in the next step try to find the command inside the ribbon:
    (a) In the Form: //ul[contains(@data-lp-id,'commandbar-Form')]//li[@aria-label='New']
or:
    (b) In the Views: //ul[contains(@data-lp-id,'commandbar-HomePageGrid')]//li[@aria-label='New']

try also to replace 'New' with other command names.

The result should look like: image

let me know what you find.

br

joesfshin13 commented 4 years ago

here is what I see - I am literally been banging my head abouts trying to resolve this its more a goal now than a bug for me now =). I have tried my debugging brains stepping, custom methods to debug the whole boat - I NEED to find this solution just so I can sleep at night but logically I am stumped -

joesfshin13 commented 4 years ago

button aria-label="New" aria-hidden="true" tabindex="-1" data-id="lead|NoRelationship|HomePageGrid|Mscrm.HomepageGrid.lead.NewRecord" data-lp-id="HomePageGrid:lead-lead|NoRelationship|HomePageGrid|Mscrm.HomepageGrid.lead.NewRecord" type="button" class="u kk gt ea t kq s kr ks flexbox">New</span

AngelRodriguez8008 commented 4 years ago

It is fine that you find the button.

I set numbers to the XPaths in my comment:

I ask because the XPath should find an <li> tag, not a button.

Please don't look for the button manually, paste the XPath in the search box, like in the picture show. that simulate what the EasyRepro code does. It should highlight the HTML element in yellow. And look in Opportunities view, like the test that you posted shown. Also look for 1. (b).

I want to know if the HTML structure was changed by 8x8.

Please also post a picture like that; image To check if we have the same App & version.

br

joesfshin13 commented 4 years ago

XapthNew

joesfshin13 commented 4 years ago

Clientversion

AngelRodriguez8008 commented 4 years ago

Do not enter your own path, try what I give you. image

AngelRodriguez8008 commented 4 years ago

image Is it UCI ? In Test you are navigating to UCI > "Sales Hub"

joesfshin13 commented 4 years ago

Yes I am navigating to UCI - Also plugging in your Xpath examples it works for Views not Forms it finds the element

joesfshin13 commented 4 years ago

SalesHubUCI

AngelRodriguez8008 commented 4 years ago

Hi, I really want to help you, but I have not enough information. Try follow:

In the Sales Hub > Sales > Leads
   1. Click on 'New' & in the Form, search for the XPath:
            //ul[contains(@data-lp-id,'commandbar-Form')]
   That get the whole Ribbon HTML.
   Choose Right click and Copy Element.  
   Paste the Result in a Text File & attach this here.
And:
   2. go back to the Leads View, search for the XPath:  
              //ul[contains(@data-lp-id,'commandbar-HomePageGrid')]
   That get the whole Ribbon HTML.
   Choose Right click and Copy Element.  
   Paste the Result in a Text File & attach this here.

Step 1: Looks like: image

Step 2: Looks like: image

joesfshin13 commented 4 years ago

Ok performed this for you please let me know what I can perform to help better troubleshoot! Thank you again HTML from CRM Page.txt

AngelRodriguez8008 commented 4 years ago

From your 'txt' I deduce that in Forms should EasyRepro works fine but, in Views there is no command in the command bar or the HTML was changed in some way.

joesfshin13 commented 4 years ago

not that I was told - but is there a way I could alter the code on Easyrepro that you see to make this work?

AngelRodriguez8008 commented 4 years ago

Yes, of course. Here is the method