This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** Settings *** | |
Library Selenium2Library | |
Library String | |
*** Variables *** | |
${BROWSER} edge | |
*** Test Cases *** | |
Network scanning | |
[Documentation] Print network details of test execution machine | |
${ip}= Evaluate [l for l in ([ip for ip in socket.gethostbyname_ex(socket.gethostname())[2] if not ip.startswith("127.")][:1], [[(s.connect(('8.8.8.8', 53)), s.getsockname()[0], s.close()) for s in [socket.socket(socket.AF_INET, socket.SOCK_DGRAM)]][0][1]]) if l][0][0] socket | |
Log To Console Private IP is: ${ip} | |
Open Browser http://api.hostip.info/get_json.php ${BROWSER} | |
${ippublic}= Get Text //html/body/pre #get the IP address text | |
Log To Console Public networking details are: ${ippublic} | |
Close Browser |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment