lgirdk / boardfarm

Automated testing with python
BSD 3-Clause Clear License
21 stars 33 forks source link

Issue with accessing the webgui through Boardfarm #353

Closed dollysingh31 closed 4 years ago

dollysingh31 commented 4 years ago

I am trying to automate accessing the webgui of my router through the boardfarm and I am having this issue popping up as below,

File "/home/user/Desktop/boardfarm/tests/Screenshot_gui.py", line 98, in runTest board = self.dev.board AttributeError: 'ScreenshotGUI' object has no attribute 'dev'

Any help or suggestions would be appreciated.

mbanders commented 4 years ago

Every test uses self.dev to run commands on devices. So if that is failing, then all the tests should be failing.

Can you run a command like the following, obviously change "YourStationName" to the name of your station:

./bft -x connect -n YourStationName -e Uname

That will connect to your station and run one test which you can see uses self.dev to run a couple commands on the board: https://github.com/lgirdk/boardfarm/blob/master/boardfarm/tests/uname.py

Let me know how that goes.

dollysingh31 commented 4 years ago

Hi, Thank you for the reply. I have gone through the steps you mentioned above. It was a little different with my setups. However, I debugged the issue, it previously showed me a none type as the value is not assigned to it and the variable went local, once I made it global the issue is now resolved.

Thank you for the support.

dollysingh31 commented 4 years ago

However, Now I see a new error where I am trying to use the curl command to open the URL and am storing the data obtained into a json file. I am not able to open the json file though, It is showing me a value error. I am trying this: data = json.load(open('file.json')) Error: ValueError: No JSON object could be decoded

Kindly provide me some inputs if possible to solve this issue.