Robotframework - Issue with seleniumlibrary along with internet explorer

146 Views Asked by At

I am using robotframework to perform web automation using IE11 and seleniumlibrary. It runs on windows 10 workstations. I use IE driver 3.14.0 32-bit as it allows to run scripts when screen is locked.

I am getting lot of Invalid selector exceptions which results in tests to fail. The selectors work well sometimes and fail after some time. Is it something with the library versions? The driver exists in the project root folder and all required IE settings are available.

I am providing the elements as variables to robot through a file. eg: home='''//a[@href="http://example.com/example/example?abc=Home"]'''

Sample error:

InvalidSelectorException: Message: Unable to locate an element with the xpath expression //a[@href="http://example.com/example/example?abc=Home"] because of the following error:
[object Error]

==

 <html>
    <head>
        <title></title>
        <script>window.history.forward(1);</script>
        <script type="text/javascript" src="example.js"></script>
        <link rel='stylesheet' type='text/css' href='example.css'>
    </head>
    <body>
    <form name='control' action='http://example.com/example/example?action=example' method='post'>
    
    <table class='top' style="height:'auto'; align:left; ">
    <tr><td align=left><a href="javascript:submitSearch('returnToSearch');">Back</a></td></tr>
    </table>
    
    <table class='page' align=left style="height:550; width:700;">
    <tr valign=top><td>
    
    <table style="height:'auto';">
        <span class='header'>
            <tr>
                <td colspan='2'><a href='http://example.com/example/example?abc=Home'> <img src='../example/theme/example.gif'  width='54'  height='25' border='0'>&nbsp; Home</a></td>
            </tr>
        </span>
    </table>
    
    <span class='middle'>
    <table class='right' style="height:'auto';">
    
    <tr><td colspan=5><font size=2><b>Example</b></font></td></tr><tr><td colspan=5><b>Example:&nbsp;</b>0000</td></tr><tr><td colspan=5><b>Example:&nbsp;</b>EXAMPLE</td></tr><tr><td colspan=5><b>EXAMPLE:&nbsp;</b>EXAMPLE</td></tr><tr><td align=center><b><u>Example</b></u></td><td align=center><b><u>Example</b></u></td><td align=center><b><u>Example</b></u></td><td align=center><b><u>Example</b></u></td><td align=center><b><u>Example abc <br>Example</b></u></td></tr><tr><td align=center><font size='3pt'></font></td><td align=center><a href='http://example.com/example/example?action=example&example=10101010&Example=5555'>555555</a></td><td align=center>10-10-10</td>
    </table>
    
    </span>
    
    </form>
    </td>
    <td><span class='right'> </span></td>
    </tr></table>
    </body>
    </html>
0

There are 0 best solutions below