jeudi 18 avril 2019

Extract content from web page into a variable using regex (WEB scenario step by step)

I've have a problems for supervision of services using zabbix. I hope some of you can help me :)

So I have to make two-steps web scenario :

first : just a request to an url. then use regex for extract from response a html content (text) and put it in {myvar}. i'm using this regex="=([0-9a-z]+);".

Then : make an other request, like www.mysite.com/{myvar}. Is it possible i saw many post on forum. I tried :

{myvar}=regex:hostid is =([0-9a-z]+); {myvar}=regex:name="text" value="=([0-9a-z]+);"

Also, I've a question, the |name="text"| correspond at the html id of the we page ? Because on my first request make, my web don't have any "id" just and an empty header.




Aucun commentaire:

Enregistrer un commentaire