0
votes

I wanted to perform click on Panel element in Selenium Robot Framework
code below:

<div class="panel panel-default">
<div class="panel-heading">
    <h4 class="panel-title">
     <span href="#panel" data-parent="#accordion" data-toggle="collapse" class="accordion-toggle panelTitle collapsed" id="panel" aria-expanded="false">Text 1<span class="toggle-icon"><i class="fa fa-plus-circle"></i></span>
                    </span>
                </h4>
            </div>

I want perform a click on "span" tag the whenever I write in my selenium robot framework as

Click Link (in first column) id=panel (in second column) It doesn't work. In my previous projects it was working fine but I am not able to make it work in this.

1
Can you show your test code please? Is the element you're clicking always present or generated by javascript? - shicky
I have created it dynamically through AngularJs ng-repeat Object. - Wasim Mulla
any success with the below guidance? If not, what issues are you hitting? - shicky

1 Answers

1
votes

This is pretty hard to answer without you providing your test code or more detail but I suspect the element doesn't exist on the page when you try to click it? What error message are you getting? Providing this can help get an answer quicker.

Reading your question closer, are you using the right keyword, are you actually clicking a link? i.e. something contained in link tags? e.g.

<a href="/10m">all we've done together</a>

Here's a rudimentary example:

Wait Until Page Contains Element     panel    10
Click Element    panel

This link should help you find further information if you require it: http://robotframework-seleniumlibrary.googlecode.com/hg/doc/SeleniumLibrary.html?r=2.8#Page Should Contain Element

Other libraries contain similar keywords you could use like the Selenium2Library