Ask a Question

Click empty span elements

Occasional Contributor

Click empty span elements

We have a HTML object with the below structure...

<span class="glypicon-fast-back"></span>

<span class="glypicon-back"></span>

<input type="numeric" />

<span class="glypicon-forward"></span>

<span class="glypicon-fast-forward"></span>

I am selecting the span elements using the QuerySelector("span.glyphicon-back") method and then trying to click the selected element, but the test run fails stating that the element does not support the click method. I have overcome this in the past by changing the selector to include an element within the span, but in this instance there is nothing else to select. 

Has anyone else seen this issue? 
Occasional Contributor

Thanks hanya, but I'd rather not have to get the HTML changed to enable to Test Complete testing. 

I think for now I'll just do a click(x,y) call as all the spans I need to click have absolute positioning so won't be moving around. 
Showing results for 
Search instead for 
Did you mean: