0

Our team replaced a submit button with the following anchor tag:

<a class="l-btn" onclick="onFormSubmit(this.form)" Style="width: 80px; text-align:center;"> 
<span class="l-btn-left"> 
<span class="l-btn-text">Save</span> 
</span>
</a>

I retrieved xpath from XPather, and tried to use from canoo webtest to click on it, but received "failed: Link not found".

Does anyone know how to simulate click on the above?

Thanks.

Grim
  • 1,938
  • 10
  • 56
  • 123
vlr
  • 780
  • 4
  • 16
  • 33

2 Answers2

0
<clickLink xpath="//a[@class='l-btn']" description="Click first a tag with class l-btn" />

See clickLink documentation

VolkerK
  • 1,412
  • 13
  • 28
0

clickLink xpath="//a[contains(@onclick,'onFormSubmit')]

description="click link with onclick property that contain the word
onFormSubmit"

will look for the link with xpath property onclick that contain a value 'onFormSubmit'

Rathakrishnan Ramasamy
  • 1,612
  • 2
  • 25
  • 46