Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > it.comp.www.php > #21699
| From | Simonex <simo@sumo.it> |
|---|---|
| Newsgroups | it.comp.www.php |
| Subject | Re: Class 'Symfony\Bundle\FrameworkBundle\Test\WebTestCase' not found |
| Date | 2017-09-07 16:49 +0200 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <oorma7$1pco$1@gioia.aioe.org> (permalink) |
| References | (4 earlier) <f183diFkqg3U1@mid.individual.net> <oommsi$19ev$1@gioia.aioe.org> <f19sl1F2gp6U1@mid.individual.net> <oopab2$1r8p$1@gioia.aioe.org> <f1cgsqFkusuU1@mid.individual.net> |
Il 07/09/2017 11:12, Alessandro Pellizzari ha scritto:
>
>>> https://github.com/DiceHoldingsInc/casperjs-php-driver
>>>
>>> (non ci ho lavorato, quindi non ti so dire molto)
>>
>> <?php //tesr.php
>> require 'vendor/autoload.php';
>>
>> $driver = new CasperJs\Driver();
>> $output = $driver->start('http://someurl.com')
>> ->click('123')
>> ->run();
>>
>> $ php test.php
>
> Come ho detto, non ci ho lavorato molto, ma il senso è che gli passi le
> operazioni da fare (scrolla x, clicca y, aspetta n secondi, ecc.) e alla
> fine verifichi che quello che hai in $output corrisponda a quello che vuoi.
>
+ cat test.php
<?php
require 'vendor/autoload.php';
$driver = new CasperJs\Driver();
$output = $driver->start('http://www.php.net/')
->click('Downloads')
->run();
// logging
file_put_contents(
__DIR__.'/output.log',
print_r($output,true)
);
if ( ! strpos($output->getHtml(), 'Old Stable')) {
throw new Exception('Test fallito');
}
+ php test.php
PHP Fatal error: Uncaught Exception: Test fallito in
/mnt/common2/pending/fuctional/test.php:17
Perchè?
Sembra che click('Downloads') non abbia effetto :(
>> ...non succede niente.
>> Ma cmq a cosa serve questo wrapper?
>
> A fare in PHP quello che faresti in javascript con casper. È un wrapper,
> appunto. :)
Cmq non riesco a far funzionare neanche casperjs.
Hai letto l'ultima parte del mio post precedente?
Back to it.comp.www.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Class 'Symfony\Bundle\FrameworkBundle\Test\WebTestCase' not found Simonex <simo@sumo.it> - 2017-08-18 14:30 +0200
Re: Class 'Symfony\Bundle\FrameworkBundle\Test\WebTestCase' not found Simonex <simo@sumo.it> - 2017-09-04 11:44 +0200
Re: Class 'Symfony\Bundle\FrameworkBundle\Test\WebTestCase' not found fmassei@gmail.com - 2017-09-04 11:24 -0700
Re: Class 'Symfony\Bundle\FrameworkBundle\Test\WebTestCase' not found Simonex <simo@sumo.it> - 2017-09-05 13:17 +0200
Re: Class 'Symfony\Bundle\FrameworkBundle\Test\WebTestCase' not found fmassei@gmail.com - 2017-09-05 05:26 -0700
Re: Class 'Symfony\Bundle\FrameworkBundle\Test\WebTestCase' not found Simonex <simo@sumo.it> - 2017-09-05 15:04 +0200
Re: Class 'Symfony\Bundle\FrameworkBundle\Test\WebTestCase' not found fmassei@gmail.com - 2017-09-05 06:25 -0700
Re: Class 'Symfony\Bundle\FrameworkBundle\Test\WebTestCase' not found Alessandro Pellizzari <shuriken@amiran.it> - 2017-09-05 17:58 +0100
Re: Class 'Symfony\Bundle\FrameworkBundle\Test\WebTestCase' not found Simonex <simo@sumo.it> - 2017-09-05 19:28 +0200
Re: Class 'Symfony\Bundle\FrameworkBundle\Test\WebTestCase' not found fmassei@gmail.com - 2017-09-05 17:14 -0700
Re: Class 'Symfony\Bundle\FrameworkBundle\Test\WebTestCase' not found Alessandro Pellizzari <shuriken@amiran.it> - 2017-09-06 10:15 +0100
Re: Class 'Symfony\Bundle\FrameworkBundle\Test\WebTestCase' not found Simonex <simo@sumo.it> - 2017-09-06 19:13 +0200
Re: Class 'Symfony\Bundle\FrameworkBundle\Test\WebTestCase' not found Alessandro Pellizzari <shuriken@amiran.it> - 2017-09-07 10:12 +0100
Re: Class 'Symfony\Bundle\FrameworkBundle\Test\WebTestCase' not found Simonex <simo@sumo.it> - 2017-09-07 16:49 +0200
Re: Class 'Symfony\Bundle\FrameworkBundle\Test\WebTestCase' not found Alessandro Pellizzari <shuriken@amiran.it> - 2017-09-07 16:38 +0100
csiph-web