Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regarding Two way verification issue. #39

Open
dpkrai96 opened this issue Jul 26, 2018 · 5 comments
Open

Regarding Two way verification issue. #39

dpkrai96 opened this issue Jul 26, 2018 · 5 comments
Assignees

Comments

@dpkrai96
Copy link

Hi merlinthemagic,,
Sorry for opening new issue. As I have already followed this thread.
Amazon daily deals page not loading completely
I have followed your thread and able to go beyond the first step of two step verification at amazon. But in second step I got an screen of insert code which is send to me via mobile number. How can I process this using MTS library. Please help me.

@merlinthemagic
Copy link
Owner

You will need to make the SMS code available to PHP using an SMS gateway.
Once the code arrives you simply type it into the input.

$selector = "[id=inputElement]";
$windowObj->focusElement($selector);

$code = "3423523";
$windowObj->sendKeyPresses($code);

$keys = array('Enter');
$windowObj->sendKeyPresses($keys);

@dpkrai96
Copy link
Author

dpkrai96 commented Aug 6, 2018

Can you please explain how can I download the excel report from server using this .The report is generated dynamically after a form submission. And the report is auto downloaded from server to local in excel format . Now I want to make it automated using this library . I am able to login with it and see/traverse through the each pages . But how can I download the report after clicking the export button .

@merlinthemagic
Copy link
Owner

you cant download using the stock version of phantomJS. There are forks that support downloading, but you will need to find the appropriate fork and use that binary instead of the version that ships with MTS. Then you need to extend the classes to incorporate the new functionality.

Make sure you can accommodate the additional RAM requirements that come with file downloads.

@merlinthemagic merlinthemagic self-assigned this Aug 8, 2018
@dpkrai96
Copy link
Author

dpkrai96 commented Aug 8, 2018

As you mentioned I got the binary with download functionality. And also I got the code for downloading the file that is following.

`var page = require('webpage').create();

page.onFileDownload = function(status){console.log('onFileDownload(' + status + ')'); return 'test.pdf'; }

page.onResourceReceived = function(status){console.log('onResourceReceived(' + status.stage + ')'); if(status.stage === 'end'){phantom.exit(1);}}

page.onResourceRequested = function(status){console.log('onResourceRequested(' + status + ')'); }

page.onFileDownloadError = function(status){console.log('onFileDownloadError(' + status + ')');phantom.exit(1);}

page.onLoadStarted = function(status){console.log('onLoadStarted(' + status + ')');}

page.onLoadFinished = function(status){console.log('onLoadFinished(' + status + ')');}

page.open('https://abc.com/test');`

Can you please implement this in your library so that It is become helpful to me.

Thanks in advance.

@merlinthemagic
Copy link
Owner

Fork MTS, implement and make a pull request please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants