I need to get IP Address of current user to use it in test. verify it it is the same in app table. how to get IP address?
Did not find anything about it
I need to get IP Address of current user to use it in test. verify it it is the same in app table. how to get IP address?
Did not find anything about it
You can use Evaluate keyword and treat is as a python problem. Using solution from this answer your solution can look something like this:
*** Test Cases ***
Example
${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 ${ip}