Forum Discussion

Nilam's avatar
Nilam
Occasional Contributor
11 years ago

Not Able to click Button whose Id is not present only @href and @class name is present

Not Able to click Button and pannel whose @Id is not present only @href and @class name is present using XPath or CSSSelector. using VB Script. can any one help me.

 

This is my html Code

 

<a href="logout.htm" class="secondary small">Logout</a>

 

Xpath code

arr13 = page.EvaluateXPath("//INPUT[@class='secondary small']")

Or

arr13 = page.EvaluateXPath("//a[contains(@href,'logout.htm')]")

arr13(i).Click

 

And

 

CSSSelector = "div.note > a.secondary.small Logout"

set arr13 = page.QuerySelector(CSSSelector)

arr13(i).Click

1 Reply