Closed happymonkey closed 7 years ago
Try return GetComponent
On 5 Oct 2016, at 7:12 PM, happymonkey notifications@github.com wrote:
Hey! I have a question with Navigate.To
(By.LinkText("linkText" ) . In my web page there is a link with the same text to the same page both in the menu and in the footer. I want to navigate to that page by the link that is in the footer not in the menu. I guess Navigate.To (By.LinkText("linkText" ) chooses the first link which is the menu link but how can I make it choose the other link? If I had a code like this: public void NavigateToSomePageByFooter() { var footerItems= Find.Element(By.ClassName("footer")); var footerItemToClick= footerItems.FindElement(By.LinkText("linkText")); footerItemToClick.Click(); } That would navigate me to the wanted page by footer link, but it would not return me the page. And it is not possible to just return new instance of that page. How can I do the same thing but also return the page?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Ok, thanks! That works.
So basically this Navigate.To<SomePage>(By.LinkText("linkText" )
does not allow to specify more?
Hey! I have a question with
Navigate.To<SomePage>(By.LinkText("linkText" )
. In my web page there is a link with the same text to the same page both in the menu and in the footer. I want to navigate to that page by the link that is in the footer not in the menu. I guessNavigate.To<SomePage>(By.LinkText("linkText" )
chooses the first link which is the menu link but how can I make it choose the other link? If I had a code like this:That would navigate me to the wanted page by footer link, but it would not return me the page. And Seleno does not allow returning new Page Object. How can I navigate to page with multiple equal link texts?