← Back to team overview

sikuli-driver team mailing list archive

[Question #261299]: Python based regexp Library : to match a number in middle in router show command

 

New question #261299 on Sikuli:
https://answers.launchpad.net/sikuli/+question/261299

I have written following test.robot file .

*** Settings ***
Library         Selenium2Library
Library         SSHLibrary
Suite Setup     Go to gmail page
Suite Teardown  Close All Browsers
         
*** Variables ***
${HOMEPAGE}     https://www.gmail.com/intl/en/mail/help/about.html
${BROWSER}      firefox
${LOGINPAGE}	https://www.gmail.com/intl/en/mail/help/about.html
${FINALURL}		https://mail.google.com/mail/
${FINALURL1}	https://accounts.google.com/ServiceLogin?service=mail&continue=https://mail.google.com/mail/'

${HOST}				10.1.1.2
${USERNAME}			test
${PASSWORD}			test

*** Test Cases ***
Login into gmail
	Go to gmail page
	Login Page Should Be Open
	Click Signin Button
	Input Username		test@xxxxxxxxx
	Input Password		test@123
	Submit Credentials
	Inbox page should open
	
Check Deep Packet Inspection Stats
	Open Connection			${HOST}
	enable ssh logging		XYZ
	Login	${USERNAME}		${PASSWORD}
	Write					enable
	Write					show dpi app stats gmail on AVC/test-15E8CC
	${output}				Read Until Regexp		.*#	

It will do the following operations:

STEP 1 : Launch gmail page in firefox browser
STEP 2 : Enter username and password
STEP 3: Press signin button
STEP 4: When above 3 steps are happening, my router will recognize as gmail traffic and show in "show dpi app stats gmail on AVC/test-15E8CC" command output.


Above things are working perfectly.

Now I want to put PASS/FAIL criteria using Robot Framework for the above scenario. 

Please refer the following link for corresponding PYTHON code:

http://stackoverflow.com/questions/28164446/how-to-match-a-number-in-middle-using-python-regular-expression


Could any one please tell me, how to write a custom RFW library for this purpose?


Thanks in advance.


-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.