I have tried the following as suggested :
I am able to see the logout link but unable to click it. Also tried adding explicit wait, with no success.
The logout link is only seen when the profile link is clicked. I am able to click the profile link to see the logout but unable to click it.
Jeanne Boyarsky wrote:Note that my previous post is just the syntax in xpath. I didn't think you could return an attribute as a webelement in Selenijm. So I tried it
This complains that I'm trying to return an attribute rather than a tag.
This means that you need to use
That will return you the anchor elements. Then you'll get the attribute for "href" from within Java or whatever language you are calling the Selenium code form.
If you need to obtain the href attribute of the link with text Logout the relevant XPath query would be something like:
Using the XPath Extractor in JMeter
posted 4 months ago
I am sorry, I have tried a lot but it did not work. I have a complex and confusing framework in my system.
Junilu suggested implementing POM model. So, I am in the process of overhauling it now.
I will definitely try this with the new framework and post my response soon. My worry is if Logout itself is not identifiable, test may not even move further.
I will also post my code so that it is easy to review, if it does not work.
I appreciate you taking time for helping this out.
Dmitri Tikhanski wrote:If you need to obtain the href attribute of the link with text Logout the relevant XPath query would be something like: