Download C. Paulino, T. Talov, Data Extraction from Solarems Solar Plant

Transcript
PHP Web Driver
DaVincii Selenium
SolarEMS.net Login Page Login Form
m
Login Button
Howeever, Seleniuum does not provide
p
PHP
P interface, which
w
meanss that PHP
caannot work directly
d
withh it. Thus, a mediator
m
is needed
n
that will be able to provide the
needed API to
o Selenium. Facebook’ss PHPWebDrriver was chhosen as a meediator.
PHPW
WebDriver provides basiic API for innteracting wiith Selenium
m, but it does
prrovide enoug
gh support for
f this projeect. It supporrts basic evennts, such as JavaScript’ss
getElementBy
yId(), whichh allows DaV
Vinci to searcch SolarEMS’s Documeent Object Model
M
(D
DOM) and determine
d
itss state. This enables
e
DaV
Vinci to loginn and browse the websitte
(F
Fig 7).
nci will takee advantage of
o the cron tables proviided by Linuux to executee
DaVin
ittself every ho
our and updaate the databbase with thee latest data available. Thhis is done by
b
taaking advanttage of CakeePHP’s [2] shhell scriptingg capabilitiees.
9