I am new to Atata framework and am trying to access the below hidden navigation menu but was not succesfull
<li class="absoluteContainer">
<span id="aboutTheProject" class="isUpperCase hasDropDownLinks">ABOUT THE PROJECT</span>
<ul class="navBlockLinksAreaSubLinkDropDown verticalMenu hidden">
<li>
<a title="Link to 'Vision' page on this site" href="/Vision" class="isUpperCase menuLink">Vision</a>
</li>
<li>
<a title="Link to 'Benefits' page on this site" href="/Benefits" class="isUpperCase menuLink">Benefits</a>
</li>
<li>
<a title="Link to 'Route' page on this site" href="/Route" class="isUpperCase menuLink">Route</a>
</li>
</ul>
</li>
Clicking on 'ABOUT THE PROJECT' makes the menu visible but Atata is unable to even click on it, although it is declared as a link or a label too. Tried a lot of options like below but no luck yet.
//[FindById("aboutTheProject")]
//[FindByClass("navBlockLinksAreaSubLinkDropDown verticalMenu hidden")]
//[FindByXPath("/html/body/div[1]/div[3]/ul/li[1]")
// > span#aboutTheProject.isUpperCase.hasDropDownLinks
//[FindByCss("body > div.navBlock.headroom.gridContainer.navBlockLayout.headroom--top.headroom--not-bottom > div.navBlockLinksArea > ul > li.absoluteContainer")]
//[FindByCss("body > div.navBlock.headroom.gridContainer.navBlockLayout.headroom--top.headroom--not-bottom > div.navBlockLinksArea > ul > li.absoluteContainer > ul", Visibility = Visibility.Hidden)]
//[FindByLabel("ABOUT THE PROJECT")]
//[FindByName("ABOUT THE PROJECT")]
[FindById("aboutTheProject")]
public Label<HomePage> AboutTheProject { get; private set; }
//public LinkDelegate<HomePage, TOwner> AboutTheProject { get; private set; }
'ABOUT THE PROJECT' is <span>
element. You should not use Label
control for it as it works with <label>
elements. You can take a look at control definition of the control class. For your case you can just use generic Control
class:
[FindById("aboutTheProject")]
public Control<HomePage> AboutTheProject { get; private set; }