dom - php-casperjs getting inner text -
I am using a PHP wrapper for casper -
I automate some repetitive jobs I'm on the Web, and I need to reach the text within an item, but it is not completely clear how to use Dome from Casparaj Browser.
I think we will do in JS
var arr = document.query selector ('label.input__label - above'). InnerText; Although I'm sure how to use the same array from php wrapper? I have been able to fill out the form and I can navigate to the page which I want with some links code, but it is not clear at all to reach Dome.
My wrapper is called a $ Casper, so I '
$ casper- & gt; Start ("google.com") As an example, which should keep me on the Google page, if I wanted to reach the domain again, and finally tell me some indoor test How can this be done?
Usually it is done in PhantomJS and CasperJS through evaluation Php-casperjs provides a evaluation function, but it does not apply to your use case, because $ casper- & gt; The evaluation does not return anything from the page context but rather in the context of $ Casper This is the cost of having such a small cover. It is a large part of the CasparJS. You can write CasparJS script because it is with javascript and it is called exec or any other similar function Opens with PHP With $ casper function with a textContent callback (note that innerText is not available in PhantomJS ) Because of the Asynchronous nature of CasparJes, it will have to do through the callback, I am not completely sure that it is possible without re-writing the large part of the cover.
Comments
Post a Comment