Skip to content

Commit

Permalink
Added the code to accept all cookies.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldrennen committed Jan 19, 2024
1 parent 6526e35 commit e407bbb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/Helpers/Login.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ public function login(): string {
endif;


// 2024-01-19:mdd
// They added the Cookie requirement.
// Click the Accept All Cookies modal
$this->Page->mouse()
->find( '#accept-all-cookies-btn' )
->click();

$this->Debug->_debug( "Filling out user and pass." );
$this->Page->evaluate( "document.querySelector('#uname').value = '" . $this->user . "';" );
$this->Page->evaluate( "document.querySelector('#pword').value = '" . $this->pass . "';" );
Expand Down
3 changes: 2 additions & 1 deletion tests/RemitSpiderUSBankTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ public function testXPath() {
$url = 'https://fims2.deerparkrd.com/lasudflasdjhflasdhflaskdhlfkashjdf.html';
$spider = $this->_getSpider();
$spider->USBankBrowser->page->navigate( $url )->waitForNavigation();
$spider->Debug->_screenshot( 'deal_page' );
$spider->Debug->_screenshot( 'test_page' );
$spider->Debug->_html( 'test_page' );
$querySelector = "//a[contains(., 'Periodic Reports - Secured')]";
$querySelector = "//a[contains(., 'Periodic Reports')][2]";
$selector = new XPathSelector( $querySelector );
Expand Down

0 comments on commit e407bbb

Please sign in to comment.