Interviewer And Interviewee Guide

SilkTest Interview Question:

How can we get the IP address of a PC?

Submitted by: Administrator
You can use the following
main
[ ] INTEGER iReturn
[ ] STRING sCmdLine = "ipconfig"
[ ] LIST OF STRING lsOutput
[ ] iReturn = SYS_Execute (sCmdLine , lsOutput)
[ ] listprint(lsOutput)

output is
[ ] Windows IP Configuration
[ ] Ethernet adapter Local Area Connection:
[ ] Connection-specific DNS Suffix . : abcd.xyz.net
[ ] IP Address. . . . . . . . . . . . : 1x.2xx.2xx.79
[ ] Subnet Mask . . . . . . . . . . . : 255.255.0.
[ ]Default Gateway . . . . . . . . . : 10.206.1.1

You need to do some trickery to parse and get the IP string..
Submitted by: Administrator

Read Online SilkTest Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.