Page 1 of 1

Selenium integration questions.

Posted: Tue Feb 03, 2015 4:07 pm
by ghostcat
OS: CentOS 64-bit
Software: Nagios XI install running on vmware.

Hello,

I am currently working on a project to automate website integrity checks using nagios monitoring.
I am using selenium IDE per the Nagios document referenced (/nagiosxi/docs/Integrating-Selenium-With-Nagios-XI.pdf )

after creating the test, exporting to perl and running clean_selenium_script we are left with the code in the following link.

http://pastebin.com/LFitPm5y

There is a problem with the way the WAIT: has been constructed on line 52 ending line 57 i believe, Though i am attempting to identify and fix the problem with my own limited Perl experience at this point.

My question, has anyone been able to get the waitForText selenium command to correctly traverse into the perl export and clean-up in the correct manner, If not what is the correct syntax to effectively do the job the selenium ide client is showing it can?

Cheers,
ghostcat

Re: Selenium integration questions.

Posted: Tue Feb 03, 2015 5:26 pm
by abrist
What (if any) errors are generated by the script? Or does it quietly die at the wait?
WAIT: { for (1..60) {
if (eval { "EastCoastProductionShutdown" eq $sel->get_text("//td[\@id='oReportCell']/div/table/tbody/tr[2]/td[3]/table/tbody/tr[3]/td[2]/div") }) { pass; last WAIT }
$sel->pause("1000");
}

Re: Selenium integration questions.

Posted: Wed Feb 04, 2015 9:38 am
by ghostcat
syntax error at graphs.pl line 58, near "elsif"
Execution of graphs.pl aborted due to compilation errors.
# Looks like your test exited with 255 before it could output anything.
58 is the elseif statement directly proceeding the wait statement, this leads me to believe its broken the if/elsif block and the wait statement is actually the culprit.

The million dollar question is, how is this wait correctly written within the perl script without breaking the if/elsif block.

The line within selenium ide reads if anyone is curious

Command:waitForText
Target://td[@id='oReportCell']/div/table/tbody/tr[2]/td[3]/table/tbody/tr[3]/td[2]/div
Value:EastCoastProductionShutdown

Many Thanks.

Re: Selenium integration questions.

Posted: Wed Feb 04, 2015 6:03 pm
by tmcdonald
Selenium isn't really a product that we do support for. We'd be glad to help with what we can, but you might have better luck on their forums, or even a Perl forum.

https://groups.google.com/forum/#!forum/selenium-users
http://seleniumforum.forumotion.net/

http://www.perlmonks.org/

We can certainly keep this on our forum, but I would like to move it out of Customer because this is not directly related to an issue with one of our products.

Re: Selenium integration questions.

Posted: Wed Feb 11, 2015 12:48 pm
by ghostcat
I think the concern here is that this is a document is published on your web-servers and not selenium's.
I understand the desire to transfer the responsibility for the issue elsewhere though, and i for one am not going to be belligerent about it.
Please lock the topic.

Kind Thanks,