The showcase is here:
https://vuetifyjs.com/en/components/buttons
I've mocked up a test using this rather than our developed product as it should be easier for you to see and try our.
The repository object which fails is identified with this RanorexPath
Code: Select all
.//button[@type='button' and @class='btn success']
Code: Select all
<button type="button" class="btn success" style="position: relative;">
<div class="btn__content">Success</div>
</button>
Code: Select all
Item 'VueInvestigationRepository.Vuetify.SuccessBtn' is no Button.
The element does not support the required capability 'button'.
Show/Hide Stacktrace
at Ranorex.Core.Repository.RepoItemInfo.FindInternal[T](Boolean findSingle, Boolean throwException, Duration effectiveTimeoutOverride) at Ranorex.Core.Repository.RepoItemInfo.<>c__DisplayClass75_0`1.<Find>b__0() at Ranorex.Core.Testing.Services.NoMaintenanceModeService.HandleElementNotFound[T](Func`1 action, RepoItemInfo entry) at Ranorex.Core.Repository.RepoItemInfo.Find[T](Boolean findSingle, Boolean throwException, Duration effectiveTimeoutOverride) at Ranorex.Core.Repository.RepoItemInfo.CreateAdapter[T](Boolean throwException, Duration waitTimeout) at Ranorex.Core.Repository.RepoItemInfo.CreateAdapter[T](Boolean throwException) at VueInvestigation.VueInvestigationRepositoryFolders.VuetifyAppFolder.get_SuccessBtn() in c:\Users\sarah.woodhouse\source\repos\Ranorex\VueInvestigation\VueInvestigation\VueInvestigationRepository.cs:line 985 at VueInvestigation.VueButton.Ranorex.Core.Testing.ITestModule.Run() in c:\Users\sarah.woodhouse\source\repos\Ranorex\VueInvestigation\VueInvestigation\VueButton.cs:line 59 at Ranorex.Core.Testing.TestModuleLeaf.RunInternal(DataContext parentDataContext, Int32 iteration, Int32 iterationCount, Boolean skipIteration)
Code: Select all
.//button[@type='button' and @class='btn success']/.//div[@class='btn__content']
The more difficult problem which has just cropped up this morning I can't see how to get around yet. This is for an example on our site, I'm trying to access the class string for a button object to determine whether it's in the active state.
The button:
Code: Select all
<div class="speed-dial speed-dial--right speed-dial--bottom speed-dial--fixed speed-dial--direction-top" open-on-hover="true" data-v-5cad50f3="">
<button type="button" class="btn btn--floating btn--raised theme--dark orange" data-ripple="true" hover="" style="position: relative;">
<div class="btn__content">
<i class="material-icons icon">add</i>
<i class="material-icons icon">close</i>
</div>
</button>
Code: Select all
.//div[@class~'speed-dial']/.//button[@type='button' and @class~'btn']
Code: Select all
public static bool FABOpen()
{
string fabStatus = repo.FormularyTree.Tree.FABStatus.GetAttributeValue<string>("class");
bool fabActive;
if (fabStatus.Contains("active")) {
fabActive = true;
} else {
fabActive = false;
}
return fabActive;
}
Code: Select all
Item 'DMDSearchRepository.FormularyTree.Tree.FABStatus' is no Button.
The element does not support the required capability 'button'.