Runnning a Selenium test on RasPi iceweasel

115 Views Asked by At

I have a Selenium test to run on RasPi. I have a problem, in that the command I use opens up iceweasel windows with open Selenium GUI, but nothing happens. I presss run test button and nothing happens then either. Also, I was hoping in the long run to add this command to crontab to perform it on a weekly basis, so I would like it to require no user input at all.

Here is my test:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="https://better.legendonlineservices.co.uk/" />
<title>Body_Pump</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Body_Pump</td></tr>
</thead><tbody>
<tr>
    <td>open</td>
    <td>/enterprise/account/login</td>
    <td></td>
</tr>
<tr>
    <td>type</td>
    <td>id=login_Password</td>
    <td>**********</td>
</tr>
<tr>
    <td>type</td>
    <td>id=login_Email</td>
    <td>***********@*********.com</td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>id=login</td>
    <td></td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>css=a.TextMembers</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>id=behSubmit</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>xpath=(//input[@name='activity'])[9]</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>id=actSubmit</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>id=bottomsubmit</td>
    <td></td>
</tr>
<tr>
    <td>selectFrame</td>
    <td>TB_iframeContent327</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>id=slot13257070</td>
    <td></td>
</tr>
<tr>
    <td>selectWindow</td>
    <td>name=TB_iframeContent415</td>
    <td></td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>link=OK</td>
    <td></td>
</tr>
<tr>
    <td>selectWindow</td>
    <td>null</td>
    <td></td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>id=btnPayNow</td>
    <td></td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>id=btnPayNow</td>
    <td></td>
</tr>

</tbody></table>
</body>
</html>

Here is the command I run Selenium with:

java -jar selenium-server-standalone-2.52.0.jar -htmlSuite "*firefox" "http://www.google.com/" "/home/pi/Documents/Body_Pump.html" "/home/pi/Documents/Log.html" 

When I run this command, this interface pops up:

Selenium interface

After it appears, nothing happens. Whatever I click nothing happens anyway. Any help would be much appreciated!

1

There are 1 best solutions below

0
Nikolay Sosnin On

The answer to my problem turned out to be the fact that I was trying to run a Selenium "test case" instead of a "test suite". It can be easily done through IDE, by opening the test case and saving a suite in the File drop-down menu.

I now however have a problem in that my test case seems to be opening through the command but not working the same way as when I just run it through the IDE.