cancel
Showing results for 
Search instead for 
Did you mean: 
cancel

Pondering Automation: Don't POSTpone working on automation!

870
Views
5
Helpful
0
Comments
Cisco Employee

Howdy out there in automation land! I hope the new year is treating you well and you are working on your automations or thinking about it. I have a bunch of ideas for blogs for the 2014 calendar year and we are kicking it off with talking about POSTs and running automations against website pages which take in FORM posts. If you do not know much about forms, I suggest you go look at

http://www.w3schools.com/html/html_forms.asp and then come back and pick up reading here. Forms allow HTML developers to submit data into a webserver while taking input from an end user and then doing some work on that data and returning some output. While it is fairly easy to automate against restful APIs and web services API (we've already done this quite a bit), there might be a need to do automation against web pages which do not have web services or in which we do not have access to those services. If the webpage has a web form we can do automation against it!

 

Now I use this methodology as a last-ditch effort. Of course, it's best to hit the web services and have a clearly defined input and output format. But the world is not always that nice and sometimes we have to make due with what we have. I believe the method in the below recording is fairly successful and should help you automate POST based forms. I have used it for at least half a dozen automation pieces and have never had an issue. Nothing is for sure and I would suspect you would vet it out in your own devevlopment or test environments. In the recording you will see me talk about URL encoding as we have to do this to a URL to make it "POST" worthy to be submitted into a web server. The URL for the URL encoding table is

http://www.w3schools.com/tags/ref_urlencode.asp . As per the recording as well, if you have any questions or would like any more information on what is in the video, please email me at the email at the bottom of this post. URL encoding is nothing more than replacing common ASCII characters with URL accepted replacements. A common example is replacing a space with "%20", you might have seen this in URLs you visit on a day to day basis. This is an important part of submitting data to a web server and I will discuss it in the video. My plan is to keep up the once monthly blogging and to continue to produce as high a quality videos and training as I can for the automation public. If there is something in particular you want me to go over, please email me or post below and I will add it to the list! Again, if you have any great automation stories, either bad automations or good automations, send them my way as I would still love to do a "automation story time" blog post.

 

As always.... ONTO THE VIDEO!

 

https://ciscosupport.webex.com/ciscosupport/lsr.php?RCID=2cac87c2e6700a05b4ccf44d956b767d

 

 

 

 

 

 

Shaun's Monthly Q/A

 

No questions this month! Hopefully we'll get some in to answer for next time!

 

 

Every   month I will pick a handful of questions from you, the reading CPO    public, to answer in this part of the blog. Please post    comments/questions below. I will no longer be using the external  e-mail   from previous blogs.

 

Please    also let me know if you like the format of this blog and what else  you   would like to see/know about. Feel free to give any ideas as to  future   blog posts, etc and I will be happy to post them. I hope to do  more   how-tos, best practices, tips, tricks, and hopefully some  interviews of   the important people behind the scenes of CPO.

 

 

WEEKLY    AUTOMATION BLOG DISCLAIMER: As always, this is a blog and my (Shaun    Roberts) thoughts on CPO, my thoughts on best practices, and my    experiences with the product and customers. The above views are in no    way representative of Cisco or any of it's partners, etc. None of  these   views, etc are supported and this is not a place to find  standard   product support. If you need standard product support please  do so via   the current call in numbers on Cisco.com or email tac@cisco.com

 

 

Thanks to all for reading and happy automating!

 

 

-Shaun Roberts

 

shaurobe@cisco.com

CreatePlease to create content
Content for Community-Ad
July's Community Spotlight Awards
This widget could not be displayed.