Forum Discussion
Adina11
14 years agoNew Contributor
I found the solution:
the property web_services_url value is 'localhost:8400', so to define the server I need only the port value 8400
----
def web_services_url = context.expand( '${#TestSuite#web_services_url}' )
web_server =web_services_url-'localhost:' //this give me only 8400
def bf = web_server.toInteger() /// convert the char value in Integer
def server = new ServerSocket(+bf) //define the server
the property web_services_url value is 'localhost:8400', so to define the server I need only the port value 8400
----
def web_services_url = context.expand( '${#TestSuite#web_services_url}' )
web_server =web_services_url-'localhost:' //this give me only 8400
def bf = web_server.toInteger() /// convert the char value in Integer
def server = new ServerSocket(+bf) //define the server