Having Name Mapping problems with a buttonKeep object using xPath
I have a button that is dynamic in several webscreens using TestComplete.
I have a buttonKeep object that is successfully implemented in the first screen it goes through the first screen and selects a Word and Excel document copies data up and then I paste it to the website
//div[(contains(@style,'display: block'))]//button[@id='Keep']
OR //div[not(contains(@style,"display:none'))]//button[contains(@class, 'fr-keep-word')]
OR //button[contains(@class, 'fr-keep-word')]
OR //div[2]/div/div/button[2]
OR //div[contains(@style,'display: block')]
Now I will select a screen that will move me on to a series of dropdowns where I will do the same thing in one of the drop downs. The system wants to add a different buttonKeep object everytime I run the test rather than recognized that the item had been mapped correctly earlier. Or even when I selected the first time I run the test. These suggestions were based on what I have found on stackoverflow but we need to figure this out.
Any suggestions would be very helpful.