diff --git a/.gitignore b/.gitignore index c68ee63..0eebbfe 100644 --- a/.gitignore +++ b/.gitignore @@ -102,6 +102,9 @@ venv.bak/ # mypy .mypy_cache/ +/.dmypy.json + +*.pdf # pycharm .idea/ @@ -118,3 +121,4 @@ venv.bak/ # others .DS_Store + diff --git a/.travis.yml b/.travis.yml index c699fd4..119fb36 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,3 +28,17 @@ jobs: - export PYTHONPATH=`pwd` - pytest --vcr-record=none - coveralls + - stage: PyPI Upload + python: 3.7 + dist: xenial + sudo: true + script: echo "Uploading packages to PyPI" + deploy: + provider: pypi + user: cuenca + password: + secure: "I5xOa610g2M0rG6I+lm3V0ROyDdfb9738OnY+Z3IZzUDo4KvTO3aIBZatMw58rW4hNAAvAyjWE0Je0ABybmcBKLf42CbR+XgRnYoKhYECVgpdWuZsIWAKGf1dmbOo/AE+LEjSSaLNuLea7+x+586uECOFB5YYyKnC5QnLj19481SdS27l4UcUOQ8JFNEMKmPhZgAAXfptsC52/pxkoMC9xdk8sVf/WHOavnB4vzcrlLIYsbOdbU2HXaUxR42TUs7k5ETEnwG3pU1Ic9EPHkFVsh/2DJEHN8fCTnEig84xopZwnlnSYI2FqBB6xp8by5D5rpfTrFY6GZ4oUYwH9u8sOVs0SVTCBDQMht2qKuKA367wQcAvHRQ60OlL6UaOKu4G4sBrEEdNMpm9XewdrMeymkJMXP1+3Rlq+qbv0QxXe12NpK53Svvm7laMC1uGZ7Qgxcwk05dTibaHlUfCzrP79m1DZ0aqyN5IgrOXEpmyJzdDa0TX7dG4OqPCLckHKmlhkAMCq2CQALd5DZ2iBKE1rECrdbsPokB9hFEIjSI9lTe4wbyFN4kUUfdDi9dtIsljVIZkDJjM1Ned2uez0jtL83mfwXXcqMdWHDcFwxQXXc+H2gjdS4MbbmiEypDmuGAlBN3XqycwnkKc/LldK0oOD9QsKle3MCS3hb7885LhVc=" + + on: + tags: true + distributions: sdist bdist_wheel diff --git a/dhlmex/__init__.py b/dhlmex/__init__.py index b67319d..3950197 100644 --- a/dhlmex/__init__.py +++ b/dhlmex/__init__.py @@ -1,4 +1,5 @@ __all__ = ['__version__', 'Client'] + from .client import Client from .version import __version__ diff --git a/dhlmex/client.py b/dhlmex/client.py index c5d641b..c2d6cb1 100644 --- a/dhlmex/client.py +++ b/dhlmex/client.py @@ -1,15 +1,18 @@ import os from typing import Any, ClassVar, Dict, Optional -from requests import Response, Session +from requests import HTTPError, Response, Session, codes +from requests.exceptions import SSLError -from .resources import Resource +from .exceptions import DhlmexException +from .resources import Guide, PostCode, Resource API_URL = 'https://prepaid.dhl.com.mx/Prepago' USER_AGENT = ( 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 ' '(KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36' ) +DHL_CERT = 'prepaid-dhl-com-mx.pem' class Client: @@ -19,30 +22,69 @@ class Client: session: Session # resources - ... + guides: ClassVar = Guide + post_codes: ClassVar = PostCode def __init__( self, username: Optional[str] = None, password: Optional[str] = None, ): + username = username or os.environ['DHLMEX_USERNAME'] password = password or os.environ['DHLMEX_PASSWORD'] self.session = Session() self.session.headers['User-Agent'] = USER_AGENT + if os.getenv('DEBUG'): + print(f'Client using Charles certificate') + self.session.verify = DHL_CERT self._login(username, password) + Resource._client = self def _login(self, username: str, password: str) -> Response: - self.get('/') # Initialize cookies - endpoint = '/jsp/app/login/login.xhtml' - data = { - 'AJAXREQUEST': '_viewRoot', - 'j_id6': 'j_id6', - 'j_id6:j_id20': username, - 'j_id6:j_id22': password, - 'javax.faces.ViewState': 'j_id4', - 'j_id6:j_id29': 'j_id6:j_id29', - } - return self.post(endpoint, data) + try: + self.get('/') # Initialize cookies + endpoint = '/jsp/app/login/login.xhtml' + data = { + 'AJAXREQUEST': '_viewRoot', + 'j_id6': 'j_id6', + 'j_id6:j_id20': username, + 'j_id6:j_id22': password, + 'javax.faces.ViewState': 'j_id1', + 'j_id6:j_id29': 'j_id6:j_id29', + } + resp = self.post(endpoint, data) + except HTTPError as httpe: + if 'Su sesión ha caducado' in resp.text: + raise DhlmexException('Session has expired') + else: + raise httpe + except SSLError: + raise DhlmexException('Cient on debug, but Charles not running') + # DHL always return 200 although there is an existing session + if 'Ya existe una sesión' in resp.text: + raise DhlmexException( + f'There is an exisiting session on DHL for {username}' + ) + return resp + + def _logout(self) -> Response: + endpoint = '/jsp/app/inicio/inicio.xhtml' + resp = self.post(endpoint, {}) + if 'Login / Admin' in resp.text: + return resp # No need to logout + data = Resource.get_data( + resp, Resource._actions['close'], + ) # Obtain headers to end properly the session + try: + resp = self.post(endpoint, data) + except HTTPError as httpe: + if 'Su sesión ha caducado' in httpe.response.text: + resp = Response() + resp.status_code = codes.ok + return resp + else: + raise httpe + return resp def get(self, endpoint: str, **kwargs: Any) -> Response: return self.request('get', endpoint, {}, **kwargs) diff --git a/dhlmex/exceptions.py b/dhlmex/exceptions.py new file mode 100644 index 0000000..0a8644a --- /dev/null +++ b/dhlmex/exceptions.py @@ -0,0 +1,4 @@ +class DhlmexException(Exception): + """ + An error has occurred during DHL scrapping + """ diff --git a/dhlmex/resources/__init__.py b/dhlmex/resources/__init__.py index 7258390..e30ff33 100644 --- a/dhlmex/resources/__init__.py +++ b/dhlmex/resources/__init__.py @@ -1,3 +1,5 @@ -__all__ = ['Resource'] +__all__ = ['Guide', 'PostCode', 'Resource'] from .base import Resource +from .guides import Guide +from .post_codes import PostCode diff --git a/dhlmex/resources/base.py b/dhlmex/resources/base.py index b045aa6..d846d8f 100644 --- a/dhlmex/resources/base.py +++ b/dhlmex/resources/base.py @@ -1,5 +1,57 @@ -from typing import ClassVar +import re +from typing import ClassVar, Dict + +from bs4 import BeautifulSoup +from requests import Response + +from dhlmex.exceptions import DhlmexException class Resource: - _client: ClassVar['cepmex.Client'] # type: ignore + _client: ClassVar["dhlmex.Client"] # type: ignore + _urls: Dict[str, str] = { + 'login': '/jsp/app/login/login.xhtml', + 'home': '/jsp/app/inicio/inicio.xhtml', + 'guide': '/jsp/app/cliente/impresionClienteSubUsuario.xhtml', + 'capture': '/jsp/app/cliente/capturaDatosImpresionClienteSU.xhtml', + 'print': '/jsp/app/cliente/guiasImpresas.xhtml', + 'pdf': '/generaImpresionPDF', + } + _actions: Dict[str, Dict[str, str]] = { + 'close': { + 'text': 'Cerrar Sesión', + 'code': 'j_id9:j_id26', + 'end': 'j_id9:j_id30', + }, + 'print': { + 'text': 'Impresión Sub Usuario', + 'code': 'j_id9:j_id14', + 'end': 'j_id9:j_id16', + }, + 'download': { + 'text': 'Guías Impresas', + 'code': 'j_id9:j_id18', + 'end': 'j_id9:j_id10', + }, + } + + @staticmethod + def get_data(resp: Response, action: Dict) -> Dict: + if 'Login / Admin' in resp.text: + raise DhlmexException('Client not logged in') + soup = BeautifulSoup(resp.text, features='html.parser') + view_state = soup.find('input', id='javax.faces.ViewState').attrs[ + 'value' + ] + js = soup.find('a', text=action['text']).attrs['onclick'] + matches = re.findall(r"\'(.+?)\'", js) + form_ids = [match for match in matches if match.startswith('j_id')] + j_pair_id = form_ids[1].split(',')[0] + j_id = form_ids[0] + + return { + j_id: j_id, + j_pair_id: action['code'], + 'javax.faces.ViewState': view_state, + action['end']: action['end'], + } diff --git a/dhlmex/resources/destination.py b/dhlmex/resources/destination.py new file mode 100644 index 0000000..94443f8 --- /dev/null +++ b/dhlmex/resources/destination.py @@ -0,0 +1,14 @@ +from dataclasses import dataclass + + +@dataclass +class Destination: + company: str + contact: str + mail: str + phone: str + address1: str + postal_code: str + neighborhood: str + city: str + state: str diff --git a/dhlmex/resources/guides.py b/dhlmex/resources/guides.py new file mode 100644 index 0000000..a1b5162 --- /dev/null +++ b/dhlmex/resources/guides.py @@ -0,0 +1,199 @@ +import os +import re +from time import sleep +from typing import Dict, Tuple + +from bs4 import BeautifulSoup +from requests import HTTPError, Response + +from dhlmex.exceptions import DhlmexException +from dhlmex.resources.origin import Origin + +from .base import Resource +from .destination import Destination +from .order_details import OrderDetails + + +class Guide(Resource): + @classmethod + def create_guide( + cls, origin: Origin, destination: Destination, details: OrderDetails + ) -> Tuple[str, str]: + guide = cls() + try: + guides_data = guide._get_guide_data() + if guides_data: + guide._select_guide(guides_data) + view_state = guide._fill_guide_table( + origin, destination, details + ) + resp = guide._confirm_capture(view_state) + if resp.ok: + guide_number = guide._force_percent(view_state) + guide_path = guide._download_pdf(guide_number) + return guide_number, guide_path + else: + raise DhlmexException('Error while creating guide') + else: + raise DhlmexException('No available guides') + except HTTPError as httpe: + raise httpe + + def _get_guide_data(self) -> Dict: + resp = self._client.post(self._urls['home'], {}) + data = self.get_data(resp, self._actions['print']) + soup = BeautifulSoup(resp.text, features='html.parser') + field = soup.find('input', id=re.compile('panelBarInput')).attrs[ + 'name' + ] + data[field] = self._actions['print']['code'] + guides_data = {} + resp = self._client.post(self._urls['home'], data) + if 'seleccionar' in resp.text: + soup = BeautifulSoup(resp.text, features='html.parser') + view_state = soup.find('input', id='javax.faces.ViewState').attrs[ + 'value' + ] + table = soup.find('table', id='j_id6:pnlOrdenesEncontradas') + table_body = table.find('tbody') + js = table_body.find('a', text='seleccionar').attrs['onclick'] + matches = re.findall(r"\'(.+?)\'", js) + form_ids = [match for match in matches if match.startswith('j_id')] + j_pair_id = form_ids[1] + j_id = form_ids[0] + guides_data = { + 'AJAXREQUEST': '_viewRoot', + j_id: j_id, + 'javax.faces.ViewState': view_state, + j_pair_id: j_pair_id, + } + return guides_data + + def _select_guide(self, guides_data: Dict) -> Dict: + resp = self._client.post(self._urls['guide'], guides_data) + soup = BeautifulSoup(resp.text, features='html.parser') + view_state = soup.find('input', id='javax.faces.ViewState').attrs[ + 'value' + ] + j_id2 = soup.find('input', value='').attrs['name'] + js = soup.find('input', value='').attrs['onkeyup'] + matches = re.findall(r"\'(.+?)\'", js) + form_ids = [match for match in matches if match.startswith('j_id')] + j_pair_id = form_ids[1] + j_id = form_ids[0] + select_data = { + 'AJAXREQUEST': '_viewRoot', + j_id: j_id, + j_id2: '1', + 'javax.faces.ViewState': view_state, + j_pair_id: j_pair_id, + 'AJAX:EVENTS_COUNT': '1', + } + self._client.post(self._urls['guide'], select_data) + select_data.pop(j_pair_id, None) + select_data.pop('AJAX:EVENTS_COUNT', None) + select_data[ + 'j_id6:btnGuardarCotizacion' + ] = 'j_id6:btnGuardarCotizacion' + self._client.post(self._urls['guide'], select_data) + return select_data + + def _fill_guide_table( + self, origin: Origin, destination: Destination, details: OrderDetails + ) -> str: + resp = self._client.get(self._urls['capture']) + soup = BeautifulSoup(resp.text, features='html.parser') + view_state = soup.find('input', id='javax.faces.ViewState').attrs[ + 'value' + ] + fill_data = self._client.post_codes.validate_postal_codes( + origin, destination, view_state + ) + fill_data['datos:j_id15'] = origin.company + fill_data['datos:j_id19'] = origin.contact + fill_data['datos:emailOrigen'] = origin.mail + fill_data['datos:j_id24'] = origin.phone + fill_data['datos:j_id28'] = origin.address1 + fill_data['datos:j_id36'] = origin.postal_code + fill_data['datos:j_id41'] = origin.neighborhood + fill_data['datos:j_id45'] = origin.city + fill_data['datos:j_id49'] = origin.state + fill_data['datos:j_id54'] = destination.company + fill_data['datos:j_id58'] = destination.contact + fill_data['datos:emailDestino'] = destination.mail + fill_data['datos:j_id63'] = destination.phone + fill_data['datos:j_id67'] = destination.address1 + fill_data['datos:j_id75'] = destination.postal_code + fill_data['datos:j_id80'] = destination.neighborhood + fill_data['datos:j_id84'] = destination.city + fill_data['datos:j_id88'] = destination.state + fill_data['datos:j_id71'] = details.description + fill_data['datos:j_id93'] = details.content + fill_data['javax.faces.ViewState'] = view_state + fill_data['datos:j_id105'] = 'datos:j_id105' + + self._client.post(self._urls['capture'], fill_data) + + return fill_data['javax.faces.ViewState'] + + def _confirm_capture(self, view_state: str) -> Response: + confirm_data = { + 'AJAXREQUEST': '_viewRoot', + 'j_id109': 'j_id109', + 'javax.faces.ViewState': view_state, + 'j_id109:j_id112': 'j_id109:j_id112', + } + return self._client.post(self._urls['capture'], confirm_data) + + def _force_percent(self, view_state: str, retries: int = 10) -> str: + force_data = { + 'AJAXREQUEST': '_viewRoot', + 'j_id115': 'j_id115', + 'javax.faces.ViewState': view_state, + 'j_id115:pb_sub': 'j_id115:pb_sub', + 'forcePercent': 'complete', + 'ajaxSingle': 'j_id115:pb_sub', + } + while retries: + resp = self._client.post(self._urls['capture'], force_data) + if 'Procesada correctamente' in resp.text: + soup = BeautifulSoup(resp.text, features='html.parser') + return soup.find( + 'td', id='j_id115:tblElementos:0:j_id123' + ).text + else: + sleep(1) + retries -= 1 + raise DhlmexException('Error while processing guide') + + def _download_pdf(self, guide_number: str) -> str: + resp = self._client.post(self._urls['home'], {}) + data = self.get_data(resp, self._actions['download']) + resp = self._client.post(self._urls['home'], data) + soup = BeautifulSoup(resp.text, features='html.parser') + view_state = soup.find('input', id='javax.faces.ViewState').attrs[ + 'value' + ] + td = soup.find('td', text=guide_number) + tds = [td for td in td.next_siblings] + j_pair_id = tds[-1].find('a').attrs['id'] + + guide_data = { + 'AJAXREQUEST': '_viewRoot', + 'j_id6': 'j_id6', + 'javax.faces.ViewState': view_state, + j_pair_id: j_pair_id, + } + self._client.post(self._urls['print'], guide_data) + resp = self._client.get(self._urls['pdf']) + path = '' + if resp.ok: + path = os.getenv('DOWNLOADS_DIRECTORY') or './' + path += f'/{guide_number}.pdf' + try: + with open(path, 'wb') as f: + f.write(resp.content) + return path + except OSError as ose: + raise DhlmexException(f'Error downloading guide: {str(ose)}') + return path diff --git a/dhlmex/resources/order_details.py b/dhlmex/resources/order_details.py new file mode 100644 index 0000000..3753f4c --- /dev/null +++ b/dhlmex/resources/order_details.py @@ -0,0 +1,7 @@ +from dataclasses import dataclass + + +@dataclass +class OrderDetails: + description: str + content: str diff --git a/dhlmex/resources/origin.py b/dhlmex/resources/origin.py new file mode 100644 index 0000000..7a8d1c3 --- /dev/null +++ b/dhlmex/resources/origin.py @@ -0,0 +1,14 @@ +from dataclasses import dataclass + + +@dataclass +class Origin: + company: str + contact: str + mail: str + phone: str + address1: str + postal_code: str + neighborhood: str + city: str + state: str diff --git a/dhlmex/resources/post_codes.py b/dhlmex/resources/post_codes.py new file mode 100644 index 0000000..345015f --- /dev/null +++ b/dhlmex/resources/post_codes.py @@ -0,0 +1,67 @@ +from typing import Dict + +from dhlmex.exceptions import DhlmexException +from dhlmex.resources.destination import Destination +from dhlmex.resources.origin import Origin + +from .base import Resource + + +class PostCode(Resource): + @classmethod + def validate_postal_codes( + cls, origin: Origin, destination: Destination, view_state: str + ): + post_code = cls() + return post_code._validate_postal_codes( + origin, destination, view_state + ) + + def _validate_postal_codes( + self, origin: Origin, destination: Destination, view_state: str + ) -> Dict: + fill_data = { + 'AJAXREQUEST': '_viewRoot', + 'datos': 'datos', + 'datos:j_id10': 'j_id11', + 'datos:j_id15': '', + 'datos:j_id19': '', + 'datos:emailOrigen': '', + 'datos:j_id24': '', + 'datos:j_id28': '', + 'datos:j_id30': '', + 'datos:j_id32': '', + 'datos:j_id36': origin.postal_code, + 'datos:j_id41': '', + 'datos:j_id45': '', + 'datos:j_id49': '', + 'datos:j_id54': '', + 'datos:j_id58': '', + 'datos:emailDestino': '', + 'datos:j_id63': '', + 'datos:j_id67': '', + 'datos:j_id69': '', + 'datos:j_id71': '', + 'datos:j_id75': '', + 'datos:j_id80': '', + 'datos:j_id84': '', + 'datos:j_id88': '', + 'datos:j_id93': '', + 'datos:j_id95': '', + 'javax.faces.ViewState': view_state, + 'datos:j_id37': 'datos:j_id37', + } + resp = self._client.post(self._urls['capture'], fill_data) + if 'Código Postal válido' in resp.text: + fill_data.pop('datos:j_id37') + # validate also destiny postal_code + fill_data['datos:j_id76'] = 'datos:j_id76' + fill_data['datos:j_id75'] = destination.postal_code + resp = self._client.post(self._urls['capture'], fill_data) + if 'Código Postal válido' in resp.text: + fill_data.pop('datos:j_id76') + return fill_data + else: + raise DhlmexException('Invalid destiny postal code') + else: + raise DhlmexException('Invalid origin postal code') diff --git a/env.template b/env.template new file mode 100644 index 0000000..0f4b2ef --- /dev/null +++ b/env.template @@ -0,0 +1,4 @@ +# Copy this to your .env file + +DHLMEX_USERNAME=alan@cuenca.com +DHLMEX_PASSWORD=password diff --git a/prepaid-dhl-com-mx.pem b/prepaid-dhl-com-mx.pem new file mode 100644 index 0000000..df20502 --- /dev/null +++ b/prepaid-dhl-com-mx.pem @@ -0,0 +1,31 @@ +-----BEGIN CERTIFICATE----- +MIIFVjCCBD6gAwIBAgIGAW8VyxOiMA0GCSqGSIb3DQEBCwUAMIGvMUAwPgYDVQQD +DDdDaGFybGVzIFByb3h5IENBICgxNyBEZWMgMjAxOSwgQWxhbnMtTWFjQm9vay1Q +cm8ubG9jYWwpMSUwIwYDVQQLDBxodHRwczovL2NoYXJsZXNwcm94eS5jb20vc3Ns +MREwDwYDVQQKDAhYSzcyIEx0ZDERMA8GA1UEBwwIQXVja2xhbmQxETAPBgNVBAgM +CEF1Y2tsYW5kMQswCQYDVQQGEwJOWjAeFw0wMDAxMDEwMDAwMDBaFw00OTAyMTIy +MTM3MDhaMIGvMUAwPgYDVQQDDDdDaGFybGVzIFByb3h5IENBICgxNyBEZWMgMjAx +OSwgQWxhbnMtTWFjQm9vay1Qcm8ubG9jYWwpMSUwIwYDVQQLDBxodHRwczovL2No +YXJsZXNwcm94eS5jb20vc3NsMREwDwYDVQQKDAhYSzcyIEx0ZDERMA8GA1UEBwwI +QXVja2xhbmQxETAPBgNVBAgMCEF1Y2tsYW5kMQswCQYDVQQGEwJOWjCCASIwDQYJ +KoZIhvcNAQEBBQADggEPADCCAQoCggEBALSq7XgA12pQPwZD2ZUtu/DswHJ1axyU +FYYjv+dyu+fixwuLC4x6oAaGOE8pqd5iqg+hDrQzZQX4AsTQPSvwzLZ3XUJRIuVF +qoz9cdRwclNwTDOno6GiGh4cA41aCGdCOLSt39i9DJwEp/6OEvP1QYeW5x47f+Kw +IfV8R5m2LBBvW/DMT4Wm3hQj+KBgvqTWOa8T+VQJ4R8gnuluYBhyGBzidqAySbMP +7EBgYNkqcrcQ9zuHUd2SCc+u3L0k3PvAEkgMHza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+2,7 @@ test=pytest [tool:pytest] -addopts = -p no:warnings -v --cov=dhlmex +addopts = -p no:warnings -v --cov=dhlmex --cov-report term-missing [flake8] inline-quotes = ' @@ -19,3 +19,6 @@ ignore_missing_imports = true [mypy-vcr] ignore_missing_imports = true + +[mypy-bs4] +ignore_missing_imports = true \ No newline at end of file diff --git a/setup.py b/setup.py index 9468920..eb07c54 100644 --- a/setup.py +++ b/setup.py @@ -4,6 +4,14 @@ version = SourceFileLoader('version', 'dhlmex/version.py').load_module() + +install_requirements = [ + 'dataclasses>=0.6;python_version<"3.7"', + 'requests>=2.22.0,<3.0.0', + 'beautifulsoup4>=4.8.1', + 'Unidecode==1.1.1', +] + test_requires = [ 'pytest', 'pytest-vcr', @@ -29,12 +37,9 @@ url='https://github.com/cuenca-mx/dhlmex-python', packages=find_packages(), include_package_data=True, - package_data=dict(mati=['py.typed']), + package_data=dict(dhlmex=['py.typed']), python_requires='>=3.6', - install_requires=[ - 'dataclasses>=0.6;python_version<"3.7"', - 'requests>=2.22.0,<3.0.0', - ], + install_requires=install_requirements, setup_requires=['pytest-runner'], tests_require=test_requires, extras_require=dict(test=test_requires), diff --git a/tests/cassettes/test_client_log_out.yaml b/tests/cassettes/test_client_log_out.yaml new file mode 100644 index 0000000..27c5f82 --- /dev/null +++ b/tests/cassettes/test_client_log_out.yaml @@ -0,0 +1,779 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: GET + uri: https://prepaid.dhl.com.mx/Prepago/ + response: + body: + string: "\n\n\n \n \n Login\ + \ / Admin\n \n \n \n \n \n \n \n \n \n\ + \
\n \n
\n\n \n
\n
\n \ + \ \n
\n
\n \"DHL\n
\n
\n\ + \ \n\n \n\n \n
\n
\n
\n\n\n \ + \
\n\n\n\n\n\n
\n\n\n\n\n\n\n\n\n\n\n\n\ +
Prepago\ + \ DHL
Debe autenticarse en el sistema para acceder
\n\n\n\n\n\n\ + \n\ + \n\n\n\n\n\ + \n\n\n
\n\n\n\n\n\ + \n\n\n\n\n\n
Usuario:
Contraseña:
\n
Recuperar Contraseña
\n\n\n\n\n\n\ + \n
\n
\n
\n
\n\n
\n
Recuperar Contraseña
\n
\n\n\n\n\n\n\n\n\n\n\n\n
Recuperación\ + \ de Contraseña
Usuario:
\n\"\
\"\"\n\n\n\n\n\n\n\ +
\n\n
new ModalPanel('pnlUsuario',\n\t\t\t\t{\n\t\t\t\ + \t\twidth: 400,\n\t\t\t\t\theight: 200,\n\n\t\t\t\t\tminWidth: -1,\n\t\t\t\ + \t\tminHeight: -1,\n\n\t\t\t\t\tresizeable: true,\n\t\t\t\t\tmoveable: true,\n\ + \n\t\t\t\t\tleft: \"auto\",\n\t\t\t\t\ttop: \"auto\",\n\n\t\t\t\t\tzindex:\ + \ 100,onresize: '',onmove: '',onshow: '',onhide: '',onbeforeshow: '',onbeforehide:\ + \ '',\n\t\t\t\t\tdomElementAttachment: \"\",\t\t\t\t\n\t\t\t\t\tkeepVisualState:\ + \ false,\n\t\t\t\t\tshowWhenRendered: false,\n\t\t\t\t\tselectBehavior: \"\ + disable\",\n\n\t\t\t\t\tautosized: false,\n\t\t\t\t\toverlapEmbedObjects:\ + \ false});
\n\ + \ \n \n \n\n \n \ + \ \n \n \n\n \n
\n \n \"Deutsche\n \n
\n\n \ + \ \n \n" + headers: + Content-Type: + - text/html;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:02:28 GMT + Server: + - Apache-Coyote/1.1 + Set-Cookie: + - JSESSIONID=26D0080371411CFC1472F22D4C796AC7; Path=/Prepago/; HttpOnly + - BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000; path=/; Httponly; Secure + Transfer-Encoding: + - chunked + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: AJAXREQUEST=%5B%27_viewRoot%27%5D&j_id6=%5B%27j_id6%27%5D&j_id6%3Aj_id20=%5B%27USERNAME%27%5D&j_id6%3Aj_id22=%5B%27PASSWORD%27%5D&javax.faces.ViewState=%5B%27j_id1%27%5D&j_id6%3Aj_id29=%5B%27j_id6%3Aj_id29%27%5D + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '148' + Content-Type: + - application/x-www-form-urlencoded + Cookie: + - JSESSIONID=26D0080371411CFC1472F22D4C796AC7; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: POST + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/login/login.xhtml + response: + body: + string: ' + + ' + headers: + Ajax-Response: + - redirect + Cache-Control: + - no-cache, must-revalidate, max_age=0, no-store + Content-Type: + - text/xml;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:02:29 GMT + Expires: + - '0' + Location: + - /Prepago/jsp/app/inicio/inicio.xhtml + Pragma: + - no-cache + Server: + - Apache-Coyote/1.1 + Transfer-Encoding: + - chunked + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Cookie: + - JSESSIONID=26D0080371411CFC1472F22D4C796AC7; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: POST + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/inicio/inicio.xhtml + response: + body: + string: "\n\n\n \n \n Administrar\n\ + \ \n \n \n \n \n \n \n \n \n\ + \
\n \n
\n\n \n
\n
\n \ + \ \n
\n
\n \"DHL\n
\n
\n\ + \ \n\n \n\n \n
\n
\n
\n \n
\n
\n\ + \
\n \n\n
\n
\n\ +
\n\n
Cliente
Cliente
\n\n\n\n\n\n\ + \n\n\n\n\n\ + \n\n\ + \n\n\n\n\n\n\ +
\n\nImpresión Sub Usuario
Guías Impresas
Asignar Recolección (SubUsuario)
Manual de Usuario
\n
Reportes
Reportes
\n\n\n\n\n\ + \n\n
Guías Generadas (SubUsuario)
\n
Salir
Salir
\n\n\n\n\n\n\n\n\n\n\n\ +
Cambiar Password
Cerrar Sesión
\n
\n
\n
\n\ + \
\n
\n \n\n \n
\n \n \"Deutsche\n \n
\n\n \ + \ \n \n" + headers: + Content-Type: + - text/html;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:02:29 GMT + Server: + - Apache-Coyote/1.1 + Transfer-Encoding: + - chunked + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: j_id9=j_id9&j_id9%3Aj_id30=j_id9%3Aj_id30&javax.faces.ViewState=j_id2 + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '69' + Content-Type: + - application/x-www-form-urlencoded + Cookie: + - JSESSIONID=26D0080371411CFC1472F22D4C796AC7; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: POST + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/inicio/inicio.xhtml + response: + body: + string: '' + headers: + Content-Length: + - '0' + Date: + - Thu, 16 Jan 2020 20:02:29 GMT + Location: + - http://prepaid.dhl.com.mx/Prepago/jsp/app/login/login.xhtml + Server: + - Apache-Coyote/1.1 + X-Powered-By: + - JSF/1.2 + status: + code: 302 + message: Found +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Cookie: + - JSESSIONID=26D0080371411CFC1472F22D4C796AC7 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: GET + uri: http://prepaid.dhl.com.mx/Prepago/jsp/app/login/login.xhtml + response: + body: + string: '' + headers: + Connection: + - Keep-Alive + Content-Length: + - '0' + Location: + - https://prepaid.dhl.com.mx/Prepago/jsp/app/login/login.xhtml + Server: + - BigIP + status: + code: 302 + message: Found +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Cookie: + - JSESSIONID=26D0080371411CFC1472F22D4C796AC7; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: GET + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/login/login.xhtml + response: + body: + string: "\n\n\n \n \n Login\ + \ / Admin\n \n \n \n \n \n \n \n \n \n\ + \
\n \n
\n\n \n
\n
\n \ + \ \n
\n
\n \"DHL\n
\n
\n\ + \ \n\n \n\n \n
\n
\n
\n\n\n \ + \
\n\n\n\n\n\n
\n\n\n\n\n\n\n\n\n\n\n\n\ +
Prepago\ + \ DHL
Debe autenticarse en el sistema para acceder
\n\n\n\n\n\n\ + \n\ + \n\n\n\n\n\ + \n\n\n
\n\n\n\n\n\ + \n\n\n\n\n\n
Usuario:
Contraseña:
\n
Recuperar Contraseña
\n\n\n\n\n\n\ + \n
\n
\n
\n
\n\n
\n
Recuperar Contraseña
\n
\n\n\n\n\n\n\n\n\n\n\n\n
Recuperación\ + \ de Contraseña
Usuario:
\n\"\
\"\"\n\n\n\n\n\n\n\ +
\n\n
new ModalPanel('pnlUsuario',\n\t\t\t\t{\n\t\t\t\ + \t\twidth: 400,\n\t\t\t\t\theight: 200,\n\n\t\t\t\t\tminWidth: -1,\n\t\t\t\ + \t\tminHeight: -1,\n\n\t\t\t\t\tresizeable: true,\n\t\t\t\t\tmoveable: true,\n\ + \n\t\t\t\t\tleft: \"auto\",\n\t\t\t\t\ttop: \"auto\",\n\n\t\t\t\t\tzindex:\ + \ 100,onresize: '',onmove: '',onshow: '',onhide: '',onbeforeshow: '',onbeforehide:\ + \ '',\n\t\t\t\t\tdomElementAttachment: \"\",\t\t\t\t\n\t\t\t\t\tkeepVisualState:\ + \ false,\n\t\t\t\t\tshowWhenRendered: false,\n\t\t\t\t\tselectBehavior: \"\ + disable\",\n\n\t\t\t\t\tautosized: false,\n\t\t\t\t\toverlapEmbedObjects:\ + \ false});
\n\ + \ \n \n \n\n \n \ + \ \n \n \n\n \n
\n \n \"Deutsche\n \n
\n\n \ + \ \n \n" + headers: + Content-Type: + - text/html;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:02:29 GMT + Server: + - Apache-Coyote/1.1 + Set-Cookie: + - JSESSIONID=BAA3BE588BAEEE6230EE7A8B45C8C639; Path=/Prepago/; HttpOnly + Transfer-Encoding: + - chunked + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +version: 1 diff --git a/tests/cassettes/test_existing_session.yaml b/tests/cassettes/test_existing_session.yaml new file mode 100644 index 0000000..98a64a5 --- /dev/null +++ b/tests/cassettes/test_existing_session.yaml @@ -0,0 +1,1302 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: GET + uri: https://prepaid.dhl.com.mx/Prepago/ + response: + body: + string: "\n\n\n \n \n Login\ + \ / Admin\n \n \n \n \n \n \n \n \n \n\ + \
\n \n
\n\n \n
\n
\n \ + \ \n
\n
\n \"DHL\n
\n
\n\ + \ \n\n \n\n \n
\n
\n
\n\n\n \ + \
\n\n\n\n\n\n
\n\n\n\n\n\n\n\n\n\n\n\n\ +
Prepago\ + \ DHL
Debe autenticarse en el sistema para acceder
\n\n\n\n\n\n\ + \n\ + \n\n\n\n\n\ + \n\n\n
\n\n\n\n\n\ + \n\n\n\n\n\n
Usuario:
Contraseña:
\n
Recuperar Contraseña
\n\n\n\n\n\n\ + \n
\n
\n
\n
\n\n
\n
Recuperar Contraseña
\n
\n\n\n\n\n\n\n\n\n\n\n\n
Recuperación\ + \ de Contraseña
Usuario:
\n\"\
\"\"\n\n\n\n\n\n\n\ +
\n\n
new ModalPanel('pnlUsuario',\n\t\t\t\t{\n\t\t\t\ + \t\twidth: 400,\n\t\t\t\t\theight: 200,\n\n\t\t\t\t\tminWidth: -1,\n\t\t\t\ + \t\tminHeight: -1,\n\n\t\t\t\t\tresizeable: true,\n\t\t\t\t\tmoveable: true,\n\ + \n\t\t\t\t\tleft: \"auto\",\n\t\t\t\t\ttop: \"auto\",\n\n\t\t\t\t\tzindex:\ + \ 100,onresize: '',onmove: '',onshow: '',onhide: '',onbeforeshow: '',onbeforehide:\ + \ '',\n\t\t\t\t\tdomElementAttachment: \"\",\t\t\t\t\n\t\t\t\t\tkeepVisualState:\ + \ false,\n\t\t\t\t\tshowWhenRendered: false,\n\t\t\t\t\tselectBehavior: \"\ + disable\",\n\n\t\t\t\t\tautosized: false,\n\t\t\t\t\toverlapEmbedObjects:\ + \ false});
\n\ + \ \n \n \n\n \n \ + \ \n \n \n\n \n
\n \n \"Deutsche\n \n
\n\n \ + \ \n \n" + headers: + Content-Type: + - text/html;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:02:30 GMT + Server: + - Apache-Coyote/1.1 + Set-Cookie: + - JSESSIONID=3E9A40F9D0F79FBB5C55DBDC472E5FBB; Path=/Prepago/; HttpOnly + - BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000; path=/; Httponly; Secure + Transfer-Encoding: + - chunked + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: AJAXREQUEST=%5B%27_viewRoot%27%5D&j_id6=%5B%27j_id6%27%5D&j_id6%3Aj_id20=%5B%27USERNAME%27%5D&j_id6%3Aj_id22=%5B%27PASSWORD%27%5D&javax.faces.ViewState=%5B%27j_id1%27%5D&j_id6%3Aj_id29=%5B%27j_id6%3Aj_id29%27%5D + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '148' + Content-Type: + - application/x-www-form-urlencoded + Cookie: + - JSESSIONID=3E9A40F9D0F79FBB5C55DBDC472E5FBB; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: POST + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/login/login.xhtml + response: + body: + string: ' + + ' + headers: + Ajax-Response: + - redirect + Cache-Control: + - no-cache, must-revalidate, max_age=0, no-store + Content-Type: + - text/xml;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:02:30 GMT + Expires: + - '0' + Location: + - /Prepago/jsp/app/inicio/inicio.xhtml + Pragma: + - no-cache + Server: + - Apache-Coyote/1.1 + Transfer-Encoding: + - chunked + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Cookie: + - JSESSIONID=3E9A40F9D0F79FBB5C55DBDC472E5FBB; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: GET + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/inicio/inicio.xhtml + response: + body: + string: "\n\n\n \n \n Administrar\n\ + \ \n \n \n \n \n \n \n \n \n\ + \
\n \n
\n\n \n
\n
\n \ + \ \n
\n
\n \"DHL\n
\n
\n\ + \ \n\n \n\n \n
\n
\n
\n \n
\n
\n\ + \
\n \n\n
\n
\n\ +
\n\n
Cliente
Cliente
\n\n\n\n\n\n\ + \n\n\n\n\n\ + \n\n\ + \n\n\n\n\n\n\ +
\n\nImpresión Sub Usuario
Guías Impresas
Asignar Recolección (SubUsuario)
Manual de Usuario
\n
Reportes
Reportes
\n\n\n\n\n\ + \n\n
Guías Generadas (SubUsuario)
\n
Salir
Salir
\n\n\n\n\n\n\n\n\n\n\n\ +
Cambiar Password
Cerrar Sesión
\n
\n
\n
\n\ + \
\n
\n \n\n \n
\n \n \"Deutsche\n \n
\n\n \ + \ \n \n" + headers: + Content-Type: + - text/html;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:02:31 GMT + Server: + - Apache-Coyote/1.1 + Transfer-Encoding: + - chunked + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: GET + uri: https://prepaid.dhl.com.mx/Prepago/ + response: + body: + string: "\n\n\n \n \n Login\ + \ / Admin\n \n \n \n \n \n \n \n \n \n\ + \
\n \n
\n\n \n
\n
\n \ + \ \n
\n
\n \"DHL\n
\n
\n\ + \ \n\n \n\n \n
\n
\n
\n\n\n \ + \
\n\n\n\n\n\n
\n\n\n\n\n\n\n\n\n\n\n\n\ +
Prepago\ + \ DHL
Debe autenticarse en el sistema para acceder
\n\n\n\n\n\n\ + \n\ + \n\n\n\n\n\ + \n\n\n
\n\n\n\n\n\ + \n\n\n\n\n\n
Usuario:
Contraseña:
\n
Recuperar Contraseña
\n\n\n\n\n\n\ + \n
\n
\n
\n
\n\n
\n
Recuperar Contraseña
\n
\n\n\n\n\n\n\n\n\n\n\n\n
Recuperación\ + \ de Contraseña
Usuario:
\n\"\
\"\"\n\n\n\n\n\n\n\ +
\n\n
new ModalPanel('pnlUsuario',\n\t\t\t\t{\n\t\t\t\ + \t\twidth: 400,\n\t\t\t\t\theight: 200,\n\n\t\t\t\t\tminWidth: -1,\n\t\t\t\ + \t\tminHeight: -1,\n\n\t\t\t\t\tresizeable: true,\n\t\t\t\t\tmoveable: true,\n\ + \n\t\t\t\t\tleft: \"auto\",\n\t\t\t\t\ttop: \"auto\",\n\n\t\t\t\t\tzindex:\ + \ 100,onresize: '',onmove: '',onshow: '',onhide: '',onbeforeshow: '',onbeforehide:\ + \ '',\n\t\t\t\t\tdomElementAttachment: \"\",\t\t\t\t\n\t\t\t\t\tkeepVisualState:\ + \ false,\n\t\t\t\t\tshowWhenRendered: false,\n\t\t\t\t\tselectBehavior: \"\ + disable\",\n\n\t\t\t\t\tautosized: false,\n\t\t\t\t\toverlapEmbedObjects:\ + \ false});
\n\ + \ \n \n \n\n \n \ + \ \n \n \n\n \n
\n \n \"Deutsche\n \n
\n\n \ + \ \n \n" + headers: + Content-Type: + - text/html;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:02:31 GMT + Server: + - Apache-Coyote/1.1 + Set-Cookie: + - JSESSIONID=0515EA76C7DB4EA6DDABB99B09BDA568; Path=/Prepago/; HttpOnly + - BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000; path=/; Httponly; Secure + Transfer-Encoding: + - chunked + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: AJAXREQUEST=%5B%27_viewRoot%27%5D&j_id6=%5B%27j_id6%27%5D&j_id6%3Aj_id20=%5B%27USERNAME%27%5D&j_id6%3Aj_id22=%5B%27PASSWORD%27%5D&javax.faces.ViewState=%5B%27j_id1%27%5D&j_id6%3Aj_id29=%5B%27j_id6%3Aj_id29%27%5D + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '148' + Content-Type: + - application/x-www-form-urlencoded + Cookie: + - JSESSIONID=0515EA76C7DB4EA6DDABB99B09BDA568; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: POST + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/login/login.xhtml + response: + body: + string: "\r\n\r\n
Ya existe\ + \ una sesi\xF3n en la aplicaci\xF3n con el usuario Andrues
Usuario:
Contrase\xF1a:
Recuperar Contrase\xF1a
Ya existe una sesi\xF3n en la aplicaci\xF3\ + n con el usuario Andrues
" + headers: + Ajax-Response: + - 'true' + Cache-Control: + - no-cache, must-revalidate, max_age=0, no-store + Content-Length: + - '4555' + Content-Type: + - text/xml;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:02:32 GMT + Expires: + - '0' + Pragma: + - no-cache + Server: + - Apache-Coyote/1.1 + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Cookie: + - JSESSIONID=3E9A40F9D0F79FBB5C55DBDC472E5FBB; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: POST + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/inicio/inicio.xhtml + response: + body: + string: "\n\n\n \n \n Administrar\n\ + \ \n \n \n \n \n \n \n \n \n\ + \
\n \n
\n\n \n
\n
\n \ + \ \n
\n
\n \"DHL\n
\n
\n\ + \ \n\n \n\n \n
\n
\n
\n \n
\n
\n\ + \
\n \n\n
\n
\n\ +
\n\n
Cliente
Cliente
\n\n\n\n\n\n\ + \n\n\n\n\n\ + \n\n\ + \n\n\n\n\n\n\ +
\n\nImpresión Sub Usuario
Guías Impresas
Asignar Recolección (SubUsuario)
Manual de Usuario
\n
Reportes
Reportes
\n\n\n\n\n\ + \n\n
Guías Generadas (SubUsuario)
\n
Salir
Salir
\n\n\n\n\n\n\n\n\n\n\n\ +
Cambiar Password
Cerrar Sesión
\n
\n
\n
\n\ + \
\n
\n \n\n \n
\n \n \"Deutsche\n \n
\n\n \ + \ \n \n" + headers: + Content-Type: + - text/html;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:02:32 GMT + Server: + - Apache-Coyote/1.1 + Transfer-Encoding: + - chunked + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: j_id9=j_id9&j_id9%3Aj_id30=j_id9%3Aj_id30&javax.faces.ViewState=j_id3 + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '69' + Content-Type: + - application/x-www-form-urlencoded + Cookie: + - JSESSIONID=3E9A40F9D0F79FBB5C55DBDC472E5FBB; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: POST + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/inicio/inicio.xhtml + response: + body: + string: '' + headers: + Content-Length: + - '0' + Date: + - Thu, 16 Jan 2020 20:02:32 GMT + Location: + - http://prepaid.dhl.com.mx/Prepago/jsp/app/login/login.xhtml + Server: + - Apache-Coyote/1.1 + X-Powered-By: + - JSF/1.2 + status: + code: 302 + message: Found +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Cookie: + - JSESSIONID=3E9A40F9D0F79FBB5C55DBDC472E5FBB + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: GET + uri: http://prepaid.dhl.com.mx/Prepago/jsp/app/login/login.xhtml + response: + body: + string: '' + headers: + Connection: + - Keep-Alive + Content-Length: + - '0' + Location: + - https://prepaid.dhl.com.mx/Prepago/jsp/app/login/login.xhtml + Server: + - BigIP + status: + code: 302 + message: Found +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Cookie: + - JSESSIONID=3E9A40F9D0F79FBB5C55DBDC472E5FBB; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: GET + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/login/login.xhtml + response: + body: + string: "\n\n\n \n \n Login\ + \ / Admin\n \n \n \n \n \n \n \n \n \n\ + \
\n \n
\n\n \n
\n
\n \ + \ \n
\n
\n \"DHL\n
\n
\n\ + \ \n\n \n\n \n
\n
\n
\n\n\n \ + \
\n\n\n\n\n\n
\n\n\n\n\n\n\n\n\n\n\n\n\ +
Prepago\ + \ DHL
Debe autenticarse en el sistema para acceder
\n\n\n\n\n\n\ + \n\ + \n\n\n\n\n\ + \n\n\n
\n\n\n\n\n\ + \n\n\n\n\n\n
Usuario:
Contraseña:
\n
Recuperar Contraseña
\n\n\n\n\n\n\ + \n
\n
\n
\n
\n\n
\n
Recuperar Contraseña
\n
\n\n\n\n\n\n\n\n\n\n\n\n
Recuperación\ + \ de Contraseña
Usuario:
\n\"\
\"\"\n\n\n\n\n\n\n\ +
\n\n
new ModalPanel('pnlUsuario',\n\t\t\t\t{\n\t\t\t\ + \t\twidth: 400,\n\t\t\t\t\theight: 200,\n\n\t\t\t\t\tminWidth: -1,\n\t\t\t\ + \t\tminHeight: -1,\n\n\t\t\t\t\tresizeable: true,\n\t\t\t\t\tmoveable: true,\n\ + \n\t\t\t\t\tleft: \"auto\",\n\t\t\t\t\ttop: \"auto\",\n\n\t\t\t\t\tzindex:\ + \ 100,onresize: '',onmove: '',onshow: '',onhide: '',onbeforeshow: '',onbeforehide:\ + \ '',\n\t\t\t\t\tdomElementAttachment: \"\",\t\t\t\t\n\t\t\t\t\tkeepVisualState:\ + \ false,\n\t\t\t\t\tshowWhenRendered: false,\n\t\t\t\t\tselectBehavior: \"\ + disable\",\n\n\t\t\t\t\tautosized: false,\n\t\t\t\t\toverlapEmbedObjects:\ + \ false});
\n\ + \ \n \n \n\n \n \ + \ \n \n \n\n \n
\n \n \"Deutsche\n \n
\n\n \ + \ \n \n" + headers: + Content-Type: + - text/html;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:02:32 GMT + Server: + - Apache-Coyote/1.1 + Set-Cookie: + - JSESSIONID=1666171B897CD969E04469F63EF362A2; Path=/Prepago/; HttpOnly + Transfer-Encoding: + - chunked + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +version: 1 diff --git a/tests/cassettes/test_successful_login.yaml b/tests/cassettes/test_successful_login.yaml index 1916c36..5f2dc32 100644 --- a/tests/cassettes/test_successful_login.yaml +++ b/tests/cassettes/test_successful_login.yaml @@ -15,181 +15,206 @@ interactions: uri: https://prepaid.dhl.com.mx/Prepago/ response: body: - string: "\n\n\n \n \n Login - / Admin\n \n \n - \ \n - \ \n \n \n \n \n \n
\n - \ \n
\n\n - \ \n
\n - \
\n \n
\n - \
\n - \ \"DHL\n
\n
\n - \ \n\n \n\n \n
\n
\n
\n\n\n
\n\n\n\n\n\n
\n\n\n\n\n\n\n\n\n\n\n\n
Prepago DHL
Debe autenticarse en - el sistema para acceder
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\n\n\n\n\n\n\n\n\n\n\n
Usuario:
Contraseña:
\n
Recuperar Contraseña
\n\n\n\n\n\n\n
\n
\n
\n
\n\n - \
\n
Recuperar Contraseña
\n
\n\n\n\n\n\n\n\n\n\n\n\n
Recuperación - de Contraseña
Usuario: -
\n\"\"
\"\"\n\n\n\n\n\n\n
\n\n
\n - \
\n
\n \n\n
\n
\n - \
\n \n\n \n \n\n \n \n" + string: "\n\n\n \n \n Login\ + \ / Admin\n \n \n \n \n \n \n \n \n \n\ + \
\n \n
\n\n \n
\n
\n \ + \ \n
\n
\n \"DHL\n
\n
\n\ + \ \n\n \n\n \n
\n
\n
\n\n\n \ + \
\n\n\n\n\n\n
\n\n\n\n\n\n\n\n\n\n\n\n\ +
Prepago\ + \ DHL
Debe autenticarse en el sistema para acceder
\n\n\n\n\n\n\ + \n\ + \n\n\n\n\n\ + \n\n\n
\n\n\n\n\n\ + \n\n\n\n\n\n
Usuario:
Contraseña:
\n
Recuperar Contraseña
\n\n\n\n\n\n\ + \n
\n
\n
\n
\n\n
\n
Recuperar Contraseña
\n
\n\n\n\n\n\n\n\n\n\n\n\n
Recuperación\ + \ de Contraseña
Usuario:
\n\"\
\"\"\n\n\n\n\n\n\n\ +
\n\n
new ModalPanel('pnlUsuario',\n\t\t\t\t{\n\t\t\t\ + \t\twidth: 400,\n\t\t\t\t\theight: 200,\n\n\t\t\t\t\tminWidth: -1,\n\t\t\t\ + \t\tminHeight: -1,\n\n\t\t\t\t\tresizeable: true,\n\t\t\t\t\tmoveable: true,\n\ + \n\t\t\t\t\tleft: \"auto\",\n\t\t\t\t\ttop: \"auto\",\n\n\t\t\t\t\tzindex:\ + \ 100,onresize: '',onmove: '',onshow: '',onhide: '',onbeforeshow: '',onbeforehide:\ + \ '',\n\t\t\t\t\tdomElementAttachment: \"\",\t\t\t\t\n\t\t\t\t\tkeepVisualState:\ + \ false,\n\t\t\t\t\tshowWhenRendered: false,\n\t\t\t\t\tselectBehavior: \"\ + disable\",\n\n\t\t\t\t\tautosized: false,\n\t\t\t\t\toverlapEmbedObjects:\ + \ false});
\n\ + \ \n \n \n\n \n \ + \ \n \n \n\n \n
\n \n \"Deutsche\n \n
\n\n \ + \ \n \n" headers: Content-Type: - text/html;charset=UTF-8 Date: - - Sun, 17 Nov 2019 23:30:50 GMT + - Thu, 16 Jan 2020 20:02:26 GMT Server: - Apache-Coyote/1.1 Set-Cookie: - - JSESSIONID=B5470032B5F652B29B9BA82DD96D17E1; Path=/Prepago/; HttpOnly + - JSESSIONID=F0730899EAC021DE714EF9ADB65E1DB5; Path=/Prepago/; HttpOnly - BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000; path=/; Httponly; Secure Transfer-Encoding: - chunked @@ -199,7 +224,7 @@ interactions: code: 200 message: OK - request: - body: AJAXREQUEST=%5B%27_viewRoot%27%5D&j_id6=%5B%27j_id6%27%5D&j_id6%3Aj_id20=%5B%27USERNAME%27%5D&j_id6%3Aj_id22=%5B%27PASSWORD%27%5D&javax.faces.ViewState=%5B%27j_id4%27%5D&j_id6%3Aj_id29=%5B%27j_id6%3Aj_id29%27%5D + body: AJAXREQUEST=%5B%27_viewRoot%27%5D&j_id6=%5B%27j_id6%27%5D&j_id6%3Aj_id20=%5B%27USERNAME%27%5D&j_id6%3Aj_id22=%5B%27PASSWORD%27%5D&javax.faces.ViewState=%5B%27j_id1%27%5D&j_id6%3Aj_id29=%5B%27j_id6%3Aj_id29%27%5D headers: Accept: - '*/*' @@ -208,11 +233,11 @@ interactions: Connection: - keep-alive Content-Length: - - '161' + - '148' Content-Type: - application/x-www-form-urlencoded Cookie: - - JSESSIONID=B5470032B5F652B29B9BA82DD96D17E1; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + - JSESSIONID=F0730899EAC021DE714EF9ADB65E1DB5; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 User-Agent: - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36 @@ -223,21 +248,21 @@ interactions: string: ' ' + content="redirect" />' headers: - Ajax-Expired: - - View state could't be restored - reload page ? Ajax-Response: - - 'true' + - redirect Cache-Control: - no-cache, must-revalidate, max_age=0, no-store Content-Type: - text/xml;charset=UTF-8 Date: - - Sun, 17 Nov 2019 23:30:50 GMT + - Thu, 16 Jan 2020 20:02:26 GMT Expires: - '0' + Location: + - /Prepago/jsp/app/inicio/inicio.xhtml Pragma: - no-cache Server: @@ -249,4 +274,713 @@ interactions: status: code: 200 message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Cookie: + - JSESSIONID=F0730899EAC021DE714EF9ADB65E1DB5; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: GET + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/inicio/inicio.xhtml + response: + body: + string: "\n\n\n \n \n Administrar\n\ + \ \n \n \n \n \n \n \n \n \n\ + \
\n \n
\n\n \n
\n
\n \ + \ \n
\n
\n \"DHL\n
\n
\n\ + \ \n\n \n\n \n
\n
\n
\n \n
\n
\n\ + \
\n \n\n
\n
\n\ +
\n\n
Cliente
Cliente
\n\n\n\n\n\n\ + \n\n\n\n\n\ + \n\n\ + \n\n\n\n\n\n\ +
\n\nImpresión Sub Usuario
Guías Impresas
Asignar Recolección (SubUsuario)
Manual de Usuario
\n
Reportes
Reportes
\n\n\n\n\n\ + \n\n
Guías Generadas (SubUsuario)
\n
Salir
Salir
\n\n\n\n\n\n\n\n\n\n\n\ +
Cambiar Password
Cerrar Sesión
\n
\n
\n
\n\ + \
\n
\n \n\n \n
\n \n \"Deutsche\n \n
\n\n \ + \ \n \n" + headers: + Content-Type: + - text/html;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:02:26 GMT + Server: + - Apache-Coyote/1.1 + Transfer-Encoding: + - chunked + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Cookie: + - JSESSIONID=F0730899EAC021DE714EF9ADB65E1DB5; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: POST + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/inicio/inicio.xhtml + response: + body: + string: "\n\n\n \n \n Administrar\n\ + \ \n \n \n \n \n \n \n \n \n\ + \
\n \n
\n\n \n
\n
\n \ + \ \n
\n
\n \"DHL\n
\n
\n\ + \ \n\n \n\n \n
\n
\n
\n \n
\n
\n\ + \
\n \n\n
\n
\n\ +
\n\n
Cliente
Cliente
\n\n\n\n\n\n\ + \n\n\n\n\n\ + \n\n\ + \n\n\n\n\n\n\ +
\n\nImpresión Sub Usuario
Guías Impresas
Asignar Recolección (SubUsuario)
Manual de Usuario
\n
Reportes
Reportes
\n\n\n\n\n\ + \n\n
Guías Generadas (SubUsuario)
\n
Salir
Salir
\n\n\n\n\n\n\n\n\n\n\n\ +
Cambiar Password
Cerrar Sesión
\n
\n
\n
\n\ + \
\n
\n \n\n \n
\n \n \"Deutsche\n \n
\n\n \ + \ \n \n" + headers: + Content-Type: + - text/html;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:02:26 GMT + Server: + - Apache-Coyote/1.1 + Transfer-Encoding: + - chunked + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: j_id9=j_id9&j_id9%3Aj_id30=j_id9%3Aj_id30&javax.faces.ViewState=j_id3 + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '69' + Content-Type: + - application/x-www-form-urlencoded + Cookie: + - JSESSIONID=F0730899EAC021DE714EF9ADB65E1DB5; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: POST + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/inicio/inicio.xhtml + response: + body: + string: '' + headers: + Content-Length: + - '0' + Date: + - Thu, 16 Jan 2020 20:02:26 GMT + Location: + - http://prepaid.dhl.com.mx/Prepago/jsp/app/login/login.xhtml + Server: + - Apache-Coyote/1.1 + X-Powered-By: + - JSF/1.2 + status: + code: 302 + message: Found +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Cookie: + - JSESSIONID=F0730899EAC021DE714EF9ADB65E1DB5 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: GET + uri: http://prepaid.dhl.com.mx/Prepago/jsp/app/login/login.xhtml + response: + body: + string: '' + headers: + Connection: + - Keep-Alive + Content-Length: + - '0' + Location: + - https://prepaid.dhl.com.mx/Prepago/jsp/app/login/login.xhtml + Server: + - BigIP + status: + code: 302 + message: Found +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Cookie: + - JSESSIONID=F0730899EAC021DE714EF9ADB65E1DB5; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: GET + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/login/login.xhtml + response: + body: + string: "\n\n\n \n \n Login\ + \ / Admin\n \n \n \n \n \n \n \n \n \n\ + \
\n \n
\n\n \n
\n
\n \ + \ \n
\n
\n \"DHL\n
\n
\n\ + \ \n\n \n\n \n
\n
\n
\n\n\n \ + \
\n\n\n\n\n\n
\n\n\n\n\n\n\n\n\n\n\n\n\ +
Prepago\ + \ DHL
Debe autenticarse en el sistema para acceder
\n\n\n\n\n\n\ + \n\ + \n\n\n\n\n\ + \n\n\n
\n\n\n\n\n\ + \n\n\n\n\n\n
Usuario:
Contraseña:
\n
Recuperar Contraseña
\n\n\n\n\n\n\ + \n
\n
\n
\n
\n\n
\n
Recuperar Contraseña
\n
\n\n\n\n\n\n\n\n\n\n\n\n
Recuperación\ + \ de Contraseña
Usuario:
\n\"\
\"\"\n\n\n\n\n\n\n\ +
\n\n
new ModalPanel('pnlUsuario',\n\t\t\t\t{\n\t\t\t\ + \t\twidth: 400,\n\t\t\t\t\theight: 200,\n\n\t\t\t\t\tminWidth: -1,\n\t\t\t\ + \t\tminHeight: -1,\n\n\t\t\t\t\tresizeable: true,\n\t\t\t\t\tmoveable: true,\n\ + \n\t\t\t\t\tleft: \"auto\",\n\t\t\t\t\ttop: \"auto\",\n\n\t\t\t\t\tzindex:\ + \ 100,onresize: '',onmove: '',onshow: '',onhide: '',onbeforeshow: '',onbeforehide:\ + \ '',\n\t\t\t\t\tdomElementAttachment: \"\",\t\t\t\t\n\t\t\t\t\tkeepVisualState:\ + \ false,\n\t\t\t\t\tshowWhenRendered: false,\n\t\t\t\t\tselectBehavior: \"\ + disable\",\n\n\t\t\t\t\tautosized: false,\n\t\t\t\t\toverlapEmbedObjects:\ + \ false});
\n\ + \ \n \n \n\n \n \ + \ \n \n \n\n \n
\n \n \"Deutsche\n \n
\n\n \ + \ \n \n" + headers: + Content-Type: + - text/html;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:02:28 GMT + Server: + - Apache-Coyote/1.1 + Set-Cookie: + - JSESSIONID=907FEB8DB91BD5A94E14C4DB151604B0; Path=/Prepago/; HttpOnly + Transfer-Encoding: + - chunked + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK version: 1 diff --git a/tests/conftest.py b/tests/conftest.py index 70bb05e..7ea6ddb 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,21 +1,77 @@ +from typing import Dict from urllib import parse import pytest from vcr import request +from dhlmex import Client +from dhlmex.resources import Resource +from dhlmex.resources.destination import Destination +from dhlmex.resources.order_details import OrderDetails +from dhlmex.resources.origin import Origin -def remove_creds(request: request.Request) -> request.Request: - if request.path.endswith('/jsp/app/login/login.xhtml'): + +def remove_creds(req: request.Request) -> request.Request: + if req.path.endswith(Resource._urls['login']) and req.method == 'POST': username_key = 'j_id6:j_id20' password_key = 'j_id6:j_id22' - body = parse.parse_qs(request.body.decode('utf-8')) + body = parse.parse_qs(req.body.decode('utf-8')) body[username_key] = ['USERNAME'] body[password_key] = ['PASSWORD'] - request.body = parse.urlencode(body) - return request + req.body = parse.urlencode(body) + return req @pytest.fixture(scope='module') def vcr_config() -> dict: config = dict(before_record_request=remove_creds) return config + + +@pytest.fixture +def site_urls() -> Dict: + return Resource._urls + + +@pytest.fixture +def client(): + client = Client() + yield client + client._logout() + + +@pytest.fixture +def origin() -> Origin: + return Origin( + company='CUENCA LABS', + contact='GINO LAPI', + mail='gino@cuenca.com', + phone='5544364200', + address1='VARSOVIA 36', + postal_code='06600', + neighborhood='JUAREZ', + city='CUAUHTEMOC', + state='CMX', + ) + + +@pytest.fixture +def destination() -> Destination: + return Destination( + company='IVANNA DÍAZ ESTRADA', + contact='IVANNA DÍAZ ESTRADA', + mail='ivanna.diaz.estrada@gmail.com', + phone='5544364200', + address1='CALLE 39 231', + postal_code='97320', + neighborhood='VICENTE GUERRERO', + city='PROGRESO', + state='YUC', + ) + + +@pytest.fixture +def details() -> OrderDetails: + return OrderDetails( + description='CASA COLOR VERDE', content='Tarjetas de presentacion', + ) diff --git a/tests/resources/cassettes/test_get_guide.yaml b/tests/resources/cassettes/test_get_guide.yaml new file mode 100644 index 0000000..48cb729 --- /dev/null +++ b/tests/resources/cassettes/test_get_guide.yaml @@ -0,0 +1,4047 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: GET + uri: https://prepaid.dhl.com.mx/Prepago/ + response: + body: + string: "\n\n\n \n \n Login\ + \ / Admin\n \n \n \n \n \n \n \n \n \n\ + \
\n \n
\n\n \n
\n
\n \ + \ \n
\n
\n \"DHL\n
\n
\n\ + \ \n\n \n\n \n
\n
\n
\n\n\n \ + \
\n\n\n\n\n\n
\n\n\n\n\n\n\n\n\n\n\n\n\ +
Prepago\ + \ DHL
Debe autenticarse en el sistema para acceder
\n\n\n\n\n\n\ + \n\ + \n\n\n\n\n\ + \n\n\n
\n\n\n\n\n\ + \n\n\n\n\n\n
Usuario:
Contraseña:
\n
Recuperar Contraseña
\n\n\n\n\n\n\ + \n
\n
\n
\n
\n\n
\n
Recuperar Contraseña
\n
\n\n\n\n\n\n\n\n\n\n\n\n
Recuperación\ + \ de Contraseña
Usuario:
\n\"\
\"\"\n\n\n\n\n\n\n\ +
\n\n
new ModalPanel('pnlUsuario',\n\t\t\t\t{\n\t\t\t\ + \t\twidth: 400,\n\t\t\t\t\theight: 200,\n\n\t\t\t\t\tminWidth: -1,\n\t\t\t\ + \t\tminHeight: -1,\n\n\t\t\t\t\tresizeable: true,\n\t\t\t\t\tmoveable: true,\n\ + \n\t\t\t\t\tleft: \"auto\",\n\t\t\t\t\ttop: \"auto\",\n\n\t\t\t\t\tzindex:\ + \ 100,onresize: '',onmove: '',onshow: '',onhide: '',onbeforeshow: '',onbeforehide:\ + \ '',\n\t\t\t\t\tdomElementAttachment: \"\",\t\t\t\t\n\t\t\t\t\tkeepVisualState:\ + \ false,\n\t\t\t\t\tshowWhenRendered: false,\n\t\t\t\t\tselectBehavior: \"\ + disable\",\n\n\t\t\t\t\tautosized: false,\n\t\t\t\t\toverlapEmbedObjects:\ + \ false});
\n\ + \ \n \n \n\n \n \ + \ \n \n \n\n \n
\n \n \"Deutsche\n \n
\n\n \ + \ \n \n" + headers: + Content-Type: + - text/html;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:16:50 GMT + Server: + - Apache-Coyote/1.1 + Set-Cookie: + - JSESSIONID=5B4E2181EB6B5D30BE8940F96845165E; Path=/Prepago/; HttpOnly + - BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000; path=/; Httponly; Secure + Transfer-Encoding: + - chunked + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: AJAXREQUEST=%5B%27_viewRoot%27%5D&j_id6=%5B%27j_id6%27%5D&j_id6%3Aj_id20=%5B%27USERNAME%27%5D&j_id6%3Aj_id22=%5B%27PASSWORD%27%5D&javax.faces.ViewState=%5B%27j_id1%27%5D&j_id6%3Aj_id29=%5B%27j_id6%3Aj_id29%27%5D + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '148' + Content-Type: + - application/x-www-form-urlencoded + Cookie: + - JSESSIONID=5B4E2181EB6B5D30BE8940F96845165E; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: POST + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/login/login.xhtml + response: + body: + string: ' + + ' + headers: + Ajax-Response: + - redirect + Cache-Control: + - no-cache, must-revalidate, max_age=0, no-store + Content-Type: + - text/xml;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:16:50 GMT + Expires: + - '0' + Location: + - /Prepago/jsp/app/inicio/inicio.xhtml + Pragma: + - no-cache + Server: + - Apache-Coyote/1.1 + Transfer-Encoding: + - chunked + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Cookie: + - JSESSIONID=5B4E2181EB6B5D30BE8940F96845165E; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: POST + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/inicio/inicio.xhtml + response: + body: + string: "\n\n\n \n \n Administrar\n\ + \ \n \n \n \n \n \n \n \n \n\ + \
\n \n
\n\n \n
\n
\n \ + \ \n
\n
\n \"DHL\n
\n
\n\ + \ \n\n \n\n \n
\n
\n
\n \n
\n
\n\ + \
\n \n\n
\n
\n\ +
\n\n
Cliente
Cliente
\n\n\n\n\n\n\ + \n\n\n\n\n\ + \n\n\ + \n\n\n\n\n\n\ +
\n\nImpresión Sub Usuario
Guías Impresas
Asignar Recolección (SubUsuario)
Manual de Usuario
\n
Reportes
Reportes
\n\n\n\n\n\ + \n\n
Guías Generadas (SubUsuario)
\n
Salir
Salir
\n\n\n\n\n\n\n\n\n\n\n\ +
Cambiar Password
Cerrar Sesión
\n
\n
\n
\n\ + \
\n
\n \n\n \n
\n \n \"Deutsche\n \n
\n\n \ + \ \n \n" + headers: + Content-Type: + - text/html;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:16:50 GMT + Server: + - Apache-Coyote/1.1 + Transfer-Encoding: + - chunked + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: j_id9=j_id9&j_id9%3Aj_id16=j_id9%3Aj_id16&javax.faces.ViewState=j_id2&j_id9%3Aj_id10=j_id9%3Aj_id14 + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '99' + Content-Type: + - application/x-www-form-urlencoded + Cookie: + - JSESSIONID=5B4E2181EB6B5D30BE8940F96845165E; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: POST + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/inicio/inicio.xhtml + response: + body: + string: '' + headers: + Content-Length: + - '0' + Date: + - Thu, 16 Jan 2020 20:16:50 GMT + Location: + - http://prepaid.dhl.com.mx/Prepago/jsp/app/cliente/impresionClienteSubUsuario.xhtml + Server: + - Apache-Coyote/1.1 + X-Powered-By: + - JSF/1.2 + status: + code: 302 + message: Found +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Cookie: + - JSESSIONID=5B4E2181EB6B5D30BE8940F96845165E + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: GET + uri: http://prepaid.dhl.com.mx/Prepago/jsp/app/cliente/impresionClienteSubUsuario.xhtml + response: + body: + string: '' + headers: + Connection: + - Keep-Alive + Content-Length: + - '0' + Location: + - https://prepaid.dhl.com.mx/Prepago/jsp/app/cliente/impresionClienteSubUsuario.xhtml + Server: + - BigIP + status: + code: 302 + message: Found +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Cookie: + - JSESSIONID=5B4E2181EB6B5D30BE8940F96845165E; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: GET + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/cliente/impresionClienteSubUsuario.xhtml + response: + body: + string: "\n\n\n \n \n Impresión\n\ + \ \n \n \n \n \n \n \n \n \n\ + \
\n \n
\n\n \n
\n
\n \ + \ \n
\n
\n \"DHL\n
\n
\n\ + \ \n\n \n\n \n
\n
\n
\n\n\n
\n\n\n\n\n\n
\n\n\ + \n\n\n\ + \n\n\n\n\n\n\n\n\n\n
\n\n\ + \n\n\n\n
Impresión Sub Usuario - Ordenes\ + \ de Compra
\n
\n\n\ + \n\n\ + \n\n
\n\n\n\n\n\ + \n\n\ + \n\n\n\n\n
Ordenes de Compra
FolioFecha de CaducidadTotal de GuíasGuías UsadasGuías DisponiblesSeleccionar
1002913430/12/2020211seleccionar
\"\"
\n
\n
\"\
\n\n\n\n\ + \n\n\n\n\n
\"\"
\n\ +
\n
\n\n \ + \
\n
\n \ + \
\n
\n \n\n
\n
\n\ +
\n\n
Cliente
Cliente
\n\n\n\n\n\n\ + \n\n\n\n\n\ + \n\n\ + \n\n\n\n\n\n\ +
\n\nImpresión Sub Usuario
Guías Impresas
Asignar Recolección (SubUsuario)
Manual de Usuario
\n
Reportes
Reportes
\n\n\n\n\n\ + \n\n
Guías Generadas (SubUsuario)
\n
Salir
Salir
\n\n\n\n\n\n\n\n\n\n\n\ +
Cambiar Password
Cerrar Sesión
\n
\n
\n
\n\ + \
\n
\n \n\n \n
\n \n \"Deutsche\n \n
\n\n \ + \ \n \n" + headers: + Content-Type: + - text/html;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:16:50 GMT + Server: + - Apache-Coyote/1.1 + Transfer-Encoding: + - chunked + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: AJAXREQUEST=_viewRoot&j_id6=j_id6&javax.faces.ViewState=j_id3&j_id6%3AtblElementos%3A0%3AlinkEditar=j_id6%3AtblElementos%3A0%3AlinkEditar + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '137' + Content-Type: + - application/x-www-form-urlencoded + Cookie: + - JSESSIONID=5B4E2181EB6B5D30BE8940F96845165E; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: POST + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/cliente/impresionClienteSubUsuario.xhtml + response: + body: + string: "\r\n\r\n
Capturar Gu\xEDas a Imprimir
1
Productos Disponibles
Descripci\xF3nGu\xEDas TotalesGu\xEDas ImpresasGu\xEDas DisponiblesGu\xEDas a Imprimir
Totales2110
Documento\ + \ 1 KG21
" + headers: + Ajax-Response: + - 'true' + Cache-Control: + - no-cache, must-revalidate, max_age=0, no-store + Content-Length: + - '6671' + Content-Type: + - text/xml;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:16:50 GMT + Expires: + - '0' + Pragma: + - no-cache + Server: + - Apache-Coyote/1.1 + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: AJAXREQUEST=_viewRoot&j_id6=j_id6&j_id6%3Aj_id48%3A0%3Aj_id71=1&javax.faces.ViewState=j_id3&j_id6%3Aj_id48%3A0%3Aj_id72=j_id6%3Aj_id48%3A0%3Aj_id72&AJAX%3AEVENTS_COUNT=1 + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '169' + Content-Type: + - application/x-www-form-urlencoded + Cookie: + - JSESSIONID=5B4E2181EB6B5D30BE8940F96845165E; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: POST + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/cliente/impresionClienteSubUsuario.xhtml + response: + body: + string: "\r\n\r\n1
" + headers: + Ajax-Response: + - 'true' + Cache-Control: + - no-cache, must-revalidate, max_age=0, no-store + Content-Length: + - '4128' + Content-Type: + - text/xml;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:16:50 GMT + Expires: + - '0' + Pragma: + - no-cache + Server: + - Apache-Coyote/1.1 + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: AJAXREQUEST=_viewRoot&j_id6=j_id6&j_id6%3Aj_id48%3A0%3Aj_id71=1&javax.faces.ViewState=j_id3&j_id6%3AbtnGuardarCotizacion=j_id6%3AbtnGuardarCotizacion + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '149' + Content-Type: + - application/x-www-form-urlencoded + Cookie: + - JSESSIONID=5B4E2181EB6B5D30BE8940F96845165E; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: POST + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/cliente/impresionClienteSubUsuario.xhtml + response: + body: + string: ' + + ' + headers: + Ajax-Response: + - redirect + Cache-Control: + - no-cache, must-revalidate, max_age=0, no-store + Content-Type: + - text/xml;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:16:51 GMT + Expires: + - '0' + Location: + - /Prepago/jsp/app/cliente/capturaDatosImpresionClienteSU.xhtml + Pragma: + - no-cache + Server: + - Apache-Coyote/1.1 + Transfer-Encoding: + - chunked + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Cookie: + - JSESSIONID=5B4E2181EB6B5D30BE8940F96845165E; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: GET + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/cliente/capturaDatosImpresionClienteSU.xhtml + response: + body: + string: "\n\n\n \n \n Datos\ + \ de Impresión\n \n \n \n \n \n \n \n \n \n\ + \
\n \n
\n\n \n
\n
\n \ + \ \n
\n
\n \"DHL\n
\n
\n\ + \ \n\n \n\n \n
\n
\n
\n\n\n
\n\n\ + \n
\n\n\n\ + \n\n\n
Impresión Sub Usuario- Capturar información
\n\n\n\n\n\n\n\n\n
\"\"
\"\"
\"\"\"\"
Remitente
\"\"
\"\"\
\"\"
Destinatario
\"\"
\"\"\
\"\"
Detalles
\"\"
\"\"\
\n\n\n\n\n\ + \n\n\n\ + \n\n\n\n\ + \n\n\n\n\n\ + \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\ + \n\n\n\n\n\n\n\n\n\n\n\ + \n\ + \n\n\n
* Compañia:
* Contacto:
Correo:
* Teléfono:
* Dirección\ + \ 1:
Línea 2:
Referencia:
* Código Postal:
* Colonia
* Ciudad:
* Estado:
\n\ +
\n\n\n\ + \n\ + \n\n\n\n\n\n\n\ + \n\n\n\n\ + \n\ + \n\n\n\n\n\ + \n\n\n\n\ + \n\n\n\n\ + \n\n\n\n\n\n\n\n\n\n\n\n\n\n\ + \n\ + \n\n\n
* Compañia:
* Contacto:
Correo:
* Teléfono:
* Dirección 1:
Linea 2:
Referencia:
* Código\ + \ Postal:
* Colonia
* Ciudad:
* Estado:
\n\ +
\n\n\n\ + \n\ + \n\n\n\n\n\n\n\ +
*Descripción:
Contenido de\ + \ la Pieza:
\n
\n\n\n\ + La información marcada con (*) debe ser capturada.\n\n\n\n\ + \n\n\n\n\n\n
\n\ + \n\n\n\n\n\n\n\n\n\ + \n
\n\n\n\n\n\n\n\n\ + \n\n
\n \n
Confirmación\ + \ antes de imprimir
\n
\n\n\n\n\n\n\ + \n\n\n\n\n
Todas las guías seleccionadas para imprimir\ + \ aparecerán con los datos ingresados en esa sección.
\n\n\ + \n\n\n\n\n\ +
\n
\n\n\ +
Generando Guías...
\n\n\n\n\n\n\n\n\n\n\n\n
\n\n\n\n\ + \n\n
\n
\n \ + \
\n\n\n\n\n\n\ +
\n
\n\n \n function limitArea(valor,maximo){\n\ + \ if(valor.length > maximo){\n \ + \ valor = valor.substring(0,maximo);\n \ + \ }\n return valor;\n \ + \ }\n \n \n
Confirmación Cerrar
\n
\n\n\n\n\n\n\n\n\n\n\n\n\ + \n\n\n\n\n
Estimado Usuario:
\n \ + \
Podrá encontrar la(s)\ + \ guía(s) generada(s) en esta sección. Le recordamos que sólo\ + \ estarán disponibles 24 horas, le invitamos a guardar sus archivos.
\n\n\ + \n\n\n\n\ +
\n
\n\n\ +
\n \n \ + \ \n \n\n
\n
\n\ +
\n\n
Cliente
Cliente
\n\n\n\n\n\n\ + \n\n\n\n\n\ + \n\n\ + \n\n\n\n\n\n\ +
\n\nImpresión Sub Usuario
Guías Impresas
Asignar Recolección (SubUsuario)
Manual de Usuario
\n
Reportes
Reportes
\n\n\n\n\n\ + \n\n
Guías Generadas (SubUsuario)
\n
Salir
Salir
\n\n\n\n\n\n\n\n\n\n\n\ +
Cambiar Password
Cerrar Sesión
\n
\n
\n
\n\ + \
\n \n \n\n \n
\n \n \"Deutsche\n \n
\n\n \ + \ \n \n" + headers: + Content-Type: + - text/html;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:16:51 GMT + Server: + - Apache-Coyote/1.1 + Transfer-Encoding: + - chunked + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: AJAXREQUEST=_viewRoot&datos=datos&datos%3Aj_id10=j_id11&datos%3Aj_id15=&datos%3Aj_id19=&datos%3AemailOrigen=&datos%3Aj_id24=&datos%3Aj_id28=&datos%3Aj_id30=&datos%3Aj_id32=&datos%3Aj_id36=06600&datos%3Aj_id41=&datos%3Aj_id45=&datos%3Aj_id49=&datos%3Aj_id54=&datos%3Aj_id58=&datos%3AemailDestino=&datos%3Aj_id63=&datos%3Aj_id67=&datos%3Aj_id69=&datos%3Aj_id71=&datos%3Aj_id75=&datos%3Aj_id80=&datos%3Aj_id84=&datos%3Aj_id88=&datos%3Aj_id93=&datos%3Aj_id95=&javax.faces.ViewState=j_id4&datos%3Aj_id37=datos%3Aj_id37 + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '513' + Content-Type: + - application/x-www-form-urlencoded + Cookie: + - JSESSIONID=5B4E2181EB6B5D30BE8940F96845165E; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: POST + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/cliente/capturaDatosImpresionClienteSU.xhtml + response: + body: + string: "\r\n\r\nCorreo:* Tel\xE9fono:L\xEDnea 2:Referencia:* C\xF3digo Postal:* Estado:
* Compa\xF1\ + ia:
* Contacto:
* Direcci\xF3n 1:
* Colonia
* Ciudad:
C\xF3digo Postal\ + \ v\xE1lido
" + headers: + Ajax-Response: + - 'true' + Cache-Control: + - no-cache, must-revalidate, max_age=0, no-store + Content-Length: + - '6077' + Content-Type: + - text/xml;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:16:51 GMT + Expires: + - '0' + Pragma: + - no-cache + Server: + - Apache-Coyote/1.1 + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: AJAXREQUEST=_viewRoot&datos=datos&datos%3Aj_id10=j_id11&datos%3Aj_id15=&datos%3Aj_id19=&datos%3AemailOrigen=&datos%3Aj_id24=&datos%3Aj_id28=&datos%3Aj_id30=&datos%3Aj_id32=&datos%3Aj_id36=06600&datos%3Aj_id41=&datos%3Aj_id45=&datos%3Aj_id49=&datos%3Aj_id54=&datos%3Aj_id58=&datos%3AemailDestino=&datos%3Aj_id63=&datos%3Aj_id67=&datos%3Aj_id69=&datos%3Aj_id71=&datos%3Aj_id75=97320&datos%3Aj_id80=&datos%3Aj_id84=&datos%3Aj_id88=&datos%3Aj_id93=&datos%3Aj_id95=&javax.faces.ViewState=j_id4&datos%3Aj_id76=datos%3Aj_id76 + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '518' + Content-Type: + - application/x-www-form-urlencoded + Cookie: + - JSESSIONID=5B4E2181EB6B5D30BE8940F96845165E; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: POST + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/cliente/capturaDatosImpresionClienteSU.xhtml + response: + body: + string: "\r\n\r\nCorreo:* Tel\xE9fono:Linea 2:Referencia:* C\xF3digo Postal:* Estado:
* Compa\xF1\ + ia:
* Contacto:
* Direcci\xF3n 1:
* Colonia
* Ciudad:
C\xF3digo Postal\ + \ v\xE1lido
" + headers: + Ajax-Response: + - 'true' + Cache-Control: + - no-cache, must-revalidate, max_age=0, no-store + Content-Length: + - '6167' + Content-Type: + - text/xml;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:16:52 GMT + Expires: + - '0' + Pragma: + - no-cache + Server: + - Apache-Coyote/1.1 + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: AJAXREQUEST=_viewRoot&datos=datos&datos%3Aj_id10=j_id11&datos%3Aj_id15=CUENCA+LABS&datos%3Aj_id19=GINO+LAPI&datos%3AemailOrigen=gino%40cuenca.com&datos%3Aj_id24=5544364200&datos%3Aj_id28=VARSOVIA+36&datos%3Aj_id30=&datos%3Aj_id32=&datos%3Aj_id36=06600&datos%3Aj_id41=JUAREZ&datos%3Aj_id45=CUAUHTEMOC&datos%3Aj_id49=CMX&datos%3Aj_id54=IVANNA+D%C3%8DAZ+ESTRADA&datos%3Aj_id58=IVANNA+D%C3%8DAZ+ESTRADA&datos%3AemailDestino=ivanna.diaz.estrada%40gmail.com&datos%3Aj_id63=5544364200&datos%3Aj_id67=CALLE+39+231&datos%3Aj_id69=&datos%3Aj_id71=CASA+COLOR+VERDE&datos%3Aj_id75=97320&datos%3Aj_id80=VICENTE+GUERRERO&datos%3Aj_id84=PROGRESO&datos%3Aj_id88=YUC&datos%3Aj_id93=Tarjetas+de+presentacion&datos%3Aj_id95=&javax.faces.ViewState=j_id4&datos%3Aj_id105=datos%3Aj_id105 + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '765' + Content-Type: + - application/x-www-form-urlencoded + Cookie: + - JSESSIONID=5B4E2181EB6B5D30BE8940F96845165E; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: POST + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/cliente/capturaDatosImpresionClienteSU.xhtml + response: + body: + string: "\r\n\r\n
if(data){validaEmails();}if(data){validaEmails();}" + headers: + Ajax-Response: + - 'true' + Cache-Control: + - no-cache, must-revalidate, max_age=0, no-store + Content-Length: + - '4122' + Content-Type: + - text/xml;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:16:52 GMT + Expires: + - '0' + Pragma: + - no-cache + Server: + - Apache-Coyote/1.1 + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: AJAXREQUEST=_viewRoot&j_id109=j_id109&javax.faces.ViewState=j_id4&j_id109%3Aj_id112=j_id109%3Aj_id112 + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '101' + Content-Type: + - application/x-www-form-urlencoded + Cookie: + - JSESSIONID=5B4E2181EB6B5D30BE8940F96845165E; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: POST + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/cliente/capturaDatosImpresionClienteSU.xhtml + response: + body: + string: "\r\n\r\n

Richfaces.showModalPanel('pnlImprimiendoSub');Richfaces.showModalPanel('pnlImprimiendoSub');" + headers: + Ajax-Response: + - 'true' + Cache-Control: + - no-cache, must-revalidate, max_age=0, no-store + Content-Length: + - '4825' + Content-Type: + - text/xml;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:16:53 GMT + Expires: + - '0' + Pragma: + - no-cache + Server: + - Apache-Coyote/1.1 + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: AJAXREQUEST=_viewRoot&j_id115=j_id115&javax.faces.ViewState=j_id4&j_id115%3Apb_sub=j_id115%3Apb_sub&forcePercent=complete&ajaxSingle=j_id115%3Apb_sub + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '149' + Content-Type: + - application/x-www-form-urlencoded + Cookie: + - JSESSIONID=5B4E2181EB6B5D30BE8940F96845165E; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: POST + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/cliente/capturaDatosImpresionClienteSU.xhtml + response: + body: + string: "\r\n\r\n
Gu\xEDaLog
Procesando Documento\ + \ 1 KG (1 de 1) :

" + headers: + Ajax-Response: + - 'true' + Cache-Control: + - no-cache, must-revalidate, max_age=0, no-store + Content-Length: + - '6383' + Content-Type: + - text/xml;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:16:53 GMT + Expires: + - '0' + Pragma: + - no-cache + Server: + - Apache-Coyote/1.1 + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: AJAXREQUEST=_viewRoot&j_id115=j_id115&javax.faces.ViewState=j_id4&j_id115%3Apb_sub=j_id115%3Apb_sub&forcePercent=complete&ajaxSingle=j_id115%3Apb_sub + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '149' + Content-Type: + - application/x-www-form-urlencoded + Cookie: + - JSESSIONID=5B4E2181EB6B5D30BE8940F96845165E; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: POST + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/cliente/capturaDatosImpresionClienteSU.xhtml + response: + body: + string: "\r\n\r\n
Gu\xEDaLog
Procesando Documento\ + \ 1 KG (1 de 1) :

" + headers: + Ajax-Response: + - 'true' + Cache-Control: + - no-cache, must-revalidate, max_age=0, no-store + Content-Length: + - '6383' + Content-Type: + - text/xml;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:16:54 GMT + Expires: + - '0' + Pragma: + - no-cache + Server: + - Apache-Coyote/1.1 + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: AJAXREQUEST=_viewRoot&j_id115=j_id115&javax.faces.ViewState=j_id4&j_id115%3Apb_sub=j_id115%3Apb_sub&forcePercent=complete&ajaxSingle=j_id115%3Apb_sub + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '149' + Content-Type: + - application/x-www-form-urlencoded + Cookie: + - JSESSIONID=5B4E2181EB6B5D30BE8940F96845165E; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: POST + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/cliente/capturaDatosImpresionClienteSU.xhtml + response: + body: + string: "\r\n\r\n
Gu\xEDaLog
Procesando Documento\ + \ 1 KG (1 de 1) :

" + headers: + Ajax-Response: + - 'true' + Cache-Control: + - no-cache, must-revalidate, max_age=0, no-store + Content-Length: + - '6383' + Content-Type: + - text/xml;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:16:56 GMT + Expires: + - '0' + Pragma: + - no-cache + Server: + - Apache-Coyote/1.1 + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: AJAXREQUEST=_viewRoot&j_id115=j_id115&javax.faces.ViewState=j_id4&j_id115%3Apb_sub=j_id115%3Apb_sub&forcePercent=complete&ajaxSingle=j_id115%3Apb_sub + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '149' + Content-Type: + - application/x-www-form-urlencoded + Cookie: + - JSESSIONID=5B4E2181EB6B5D30BE8940F96845165E; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: POST + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/cliente/capturaDatosImpresionClienteSU.xhtml + response: + body: + string: "\r\n\r\n
Gu\xEDaLog
4113784231
Procesando Documento 1 KG (1 de 1) :
Gu\xEDa: (4113784231) Procesada correctamente
" + headers: + Ajax-Response: + - 'true' + Cache-Control: + - no-cache, must-revalidate, max_age=0, no-store + Content-Length: + - '6672' + Content-Type: + - text/xml;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:16:57 GMT + Expires: + - '0' + Pragma: + - no-cache + Server: + - Apache-Coyote/1.1 + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Cookie: + - JSESSIONID=5B4E2181EB6B5D30BE8940F96845165E; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: POST + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/inicio/inicio.xhtml + response: + body: + string: "\n\n\n \n \n Administrar\n\ + \ \n \n \n \n \n \n \n \n \n\ + \
\n \n
\n\n \n
\n
\n \ + \ \n
\n
\n \"DHL\n
\n
\n\ + \ \n\n \n\n \n
\n
\n
\n \n
\n
\n\ + \
\n \n\n
\n
\n\ +
\n\n
Cliente
Cliente
\n\n\n\n\n\n\ + \n\n\n\n\n\ + \n\n\ + \n\n\n\n\n\n\ +
\n\nImpresión Sub Usuario
Guías Impresas
Asignar Recolección (SubUsuario)
Manual de Usuario
\n
Reportes
Reportes
\n\n\n\n\n\ + \n\n
Guías Generadas (SubUsuario)
\n
Salir
Salir
\n\n\n\n\n\n\n\n\n\n\n\ +
Cambiar Password
Cerrar Sesión
\n
\n
\n
\n\ + \
\n
\n \n\n \n
\n \n \"Deutsche\n \n
\n\n \ + \ \n \n" + headers: + Content-Type: + - text/html;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:16:57 GMT + Server: + - Apache-Coyote/1.1 + Transfer-Encoding: + - chunked + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: j_id9=j_id9&j_id9%3Aj_id18=j_id9%3Aj_id18&javax.faces.ViewState=j_id5&j_id9%3Aj_id10=j_id9%3Aj_id10 + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '99' + Content-Type: + - application/x-www-form-urlencoded + Cookie: + - JSESSIONID=5B4E2181EB6B5D30BE8940F96845165E; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: POST + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/inicio/inicio.xhtml + response: + body: + string: '' + headers: + Content-Length: + - '0' + Date: + - Thu, 16 Jan 2020 20:16:57 GMT + Location: + - http://prepaid.dhl.com.mx/Prepago/jsp/app/cliente/guiasImpresas.xhtml + Server: + - Apache-Coyote/1.1 + X-Powered-By: + - JSF/1.2 + status: + code: 302 + message: Found +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Cookie: + - JSESSIONID=5B4E2181EB6B5D30BE8940F96845165E + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: GET + uri: http://prepaid.dhl.com.mx/Prepago/jsp/app/cliente/guiasImpresas.xhtml + response: + body: + string: '' + headers: + Connection: + - Keep-Alive + Content-Length: + - '0' + Location: + - https://prepaid.dhl.com.mx/Prepago/jsp/app/cliente/guiasImpresas.xhtml + Server: + - BigIP + status: + code: 302 + message: Found +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Cookie: + - JSESSIONID=5B4E2181EB6B5D30BE8940F96845165E; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: GET + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/cliente/guiasImpresas.xhtml + response: + body: + string: "\n\n\n \n \n Impresión\n\ + \ \n \n \n \n \n \n \n \n \n\ + \
\n \n
\n\n \n
\n
\n \ + \ \n
\n
\n \"DHL\n
\n
\n\ + \ \n\n \n\n \n
\n
\n
\n\n\n \ + \
\n\n\n\n\n\n\n\ + \n\n\n\n\n\n\n\n
\n\n\n\n\n\n\n\n\ +
\n
Guías Generadas
\n
\n\n\n\n\n\n
Las guías\ + \ están disponibles en esta sección hasta 24 horas después\ + \ de la hora de impresión.
\n
\n\n\n\n\ + \n\n
\n\n\n\n\n\n\ + \n\n\n
1
Guías Disponibles
Orden de CompraGuíaFecha CreaciónCaducidad (días)Archivo
10029134411377268116/01/2020
10029134411378423116/01/20201
\n
\n
\"\
\n\n\n\n\ + \n\n
\n
Richfaces.componentControl.attachAvailable('#hidelink','onclick','#pnlImprimiendo','hide')
Archivo
\n
\n\n\n\n\n\n\n\n
\n
\n\ + \n
\n
\n \n \n \ + \ \n\n
\n
\n
\n\n
Cliente
Cliente
\n\n\n\n\n\n\ + \n\n\n\n\n\ + \n\n\ + \n\n\n\n\n\n\ +
\n\nImpresión Sub Usuario
Guías Impresas
Asignar Recolección (SubUsuario)
Manual de Usuario
\n
Reportes
Reportes
\n\n\n\n\n\ + \n\n
Guías Generadas (SubUsuario)
\n
Salir
Salir
\n\n\n\n\n\n\n\n\n\n\n\ +
Cambiar Password
Cerrar Sesión
\n
\n
\n
\n\ + \
\n \n \n\n \n
\n \n \"Deutsche\n \n
\n\n \ + \ \n \n" + headers: + Content-Type: + - text/html;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:16:57 GMT + Server: + - Apache-Coyote/1.1 + Transfer-Encoding: + - chunked + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: AJAXREQUEST=_viewRoot&j_id6=j_id6&javax.faces.ViewState=j_id6&j_id6%3AtblElementos%3A1%3Aj_id35=j_id6%3AtblElementos%3A1%3Aj_id35 + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '129' + Content-Type: + - application/x-www-form-urlencoded + Cookie: + - JSESSIONID=5B4E2181EB6B5D30BE8940F96845165E; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: POST + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/cliente/guiasImpresas.xhtml + response: + body: + string: "\r\n\r\n
Richfaces.showModalPanel('pnlImprimiendo');Richfaces.showModalPanel('pnlImprimiendo');" + headers: + Ajax-Response: + - 'true' + Cache-Control: + - no-cache, must-revalidate, max_age=0, no-store + Content-Length: + - '3819' + Content-Type: + - text/xml;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:16:57 GMT + Expires: + - '0' + Pragma: + - no-cache + Server: + - Apache-Coyote/1.1 + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Cookie: + - JSESSIONID=5B4E2181EB6B5D30BE8940F96845165E; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: GET + uri: https://prepaid.dhl.com.mx/Prepago/generaImpresionPDF + response: + body: + string: !!binary | + JVBERi0xLjQKJeLjz9MKMiAwIG9iago8PC9GaWx0ZXIvRmxhdGVEZWNvZGUvTGVuZ3RoIDUxPj5z + dHJlYW0KeJwr5HIK4TJQMLU01TOyUAhJ4XIN4QrkKlQwVDAAQgiZnKugH5FmqOCSrxDIBQD9oQpW + CmVuZHN0cmVhbQplbmRvYmoKNCAwIG9iago8PC9TdWJ0eXBlL1R5cGUxL1R5cGUvRm9udC9CYXNl + Rm9udC9IZWx2ZXRpY2EtQm9sZC9FbmNvZGluZy9XaW5BbnNpRW5jb2Rpbmc+PgplbmRvYmoKNSAw + IG9iago8PC9TdWJ0eXBlL1R5cGUxL1R5cGUvRm9udC9CYXNlRm9udC9IZWx2ZXRpY2EvRW5jb2Rp + bmcvV2luQW5zaUVuY29kaW5nPj4KZW5kb2JqCjYgMCBvYmoKPDwvQ29sb3JTcGFjZVsvQ2FsUkdC + PDwvR2FtbWFbMi4yIDIuMiAyL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Hc1Kay8wo+ + VZ3HMaUuZqFTFsZkU9UplbXETyXSnYmdd9k2ukGhbeisH/TuQBsZO+OpGySlzIUhJGyqYOHZvA5N + /kwPEzfSdW5UNwdu2c0+gWNCh6OwOELwU9IYh0zO4cGForhOaE4ShU3kiZiVos+0zn1RUxgyRAuV + Nnk6CVXAeaCyMduGLmSpbf7Q4IcB22PDHPSs0E++i2bQu6xx8sajO400XQzDfHBIeQhZ3bSTxdkb + BStKDbA70KbzoVog3DquYY6pdn6LDNhENgyBuss2udMhkMrmFTL43GgK/KhVwk2I68tme1j3RnHt + sPNqbzDMo6QheFpLwzRgUynFhg3TzIfLqBOeB800dAg0Nd8Zm3dMID9nvctau3xAOZc3crEvumGU + ceCuS6r2g9pQv1JzRtENw2IgkeHzAUF6l7ViIWL2Mg7+cI78kccG/kBn+TpW1NHWuY32RTeMsjOM + BZ9G5kPQwddxMfusM8P6LmkWl8FmWLtV5/mjvbGtPwzsajxThpPMmINzQsNy00zDALw7XB+piUur + jY606EM+pUDlLQFut7jfYHnjyYm+I1szrixj4LwbY3GTxxo99xHkHTZd3e6eT3CAO20t5t/kM4nS + QPXUkBbGpODx/GI5QcHBCMeyU3kOlIO1AodgUljfbh8f+yfxzURGDOieCRDsXkwpd7MjOMdcwPQI + pMX18nwxF6fzb9d/hwUHoy8sGSmXvzk5vwDO5clf51g4lHUoHAWuoTG9na/WF29P5gISg/jher5a + /vQ3mNHgCUwOkx5rDkBK76UUi+v59fdXy7OLhRCLs3d/AxocJoQy4aQilUKTCIe7iSd3A4UbHJUp + DtWPczSoxcM9FD37qSB6XGeHEEychiBOOdjnCHHOWuOtlpJjaNXZoPAEH1dd0c2qc35qvh6P4uLD + JGnRrfqbfvvH4apTWPX8CeWlw1PduoQ7/G7UPuHu2s2UcphZR73OZwJk17HFoAcLAxsVNhVrMTAh + z+SENGil8OCsfQy69jG0GPRgMfRRW4z+T5N+gWrPDwtWKm/IMydv5+fnc3F8Mv9JLNdXq/nxfDKm + 00w4b138x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BuIAowMDAwMDA3MTUwIDAwMDAwIG4gCjAwMDAwMTM5MTMg + MDAwMDAgbiAKMDAwMDAxMDUwNyAwMDAwMCBuIAowMDAwMDEwODA4IDAwMDAwIG4gCjAwMDAwMTA2 + MjUgMDAwMDAgbiAKMDAwMDAxMDcxOSAwMDAwMCBuIAowMDAwMDE0MTU0IDAwMDAwIG4gCjAwMDAw + MTQyMDAgMDAwMDAgbiAKdHJhaWxlcgo8PC9JbmZvIDE5IDAgUi9JRCBbPDQ0NzAxNDIyMzUzZjA4 + NTE0MDA3OGM5YWIwY2UxM2IzPjxhMzUzZGI2M2RiZDAzZDlkMDdmNWVkMzc3NDNmZWEwZD5dL1Jv + b3QgMTggMCBSL1NpemUgMjA+PgpzdGFydHhyZWYKMTQzMTEKJSVFT0YK + headers: + Content-Disposition: + - inline; filename="10029134_4113784231_1.pdf" + Content-Length: + - '14862' + Content-Type: + - application/pdf + Date: + - Thu, 16 Jan 2020 20:16:57 GMT + Server: + - Apache-Coyote/1.1 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Cookie: + - JSESSIONID=5B4E2181EB6B5D30BE8940F96845165E; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: POST + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/inicio/inicio.xhtml + response: + body: + string: "\n\n\n \n \n Administrar\n\ + \ \n \n \n \n \n \n \n \n \n\ + \
\n \n
\n\n \n
\n
\n \ + \ \n
\n
\n \"DHL\n
\n
\n\ + \ \n\n \n\n \n
\n
\n
\n \n
\n
\n\ + \
\n \n\n
\n
\n\ +
\n\n
Cliente
Cliente
\n\n\n\n\n\n\ + \n\n\n\n\n\ + \n\n\ + \n\n\n\n\n\n\ +
\n\nImpresión Sub Usuario
Guías Impresas
Asignar Recolección (SubUsuario)
Manual de Usuario
\n
Reportes
Reportes
\n\n\n\n\n\ + \n\n
Guías Generadas (SubUsuario)
\n
Salir
Salir
\n\n\n\n\n\n\n\n\n\n\n\ +
Cambiar Password
Cerrar Sesión
\n
\n
\n
\n\ + \
\n
\n \n\n \n
\n \n \"Deutsche\n \n
\n\n \ + \ \n \n" + headers: + Content-Type: + - text/html;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:16:58 GMT + Server: + - Apache-Coyote/1.1 + Transfer-Encoding: + - chunked + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +- request: + body: j_id9=j_id9&j_id9%3Aj_id30=j_id9%3Aj_id30&javax.faces.ViewState=j_id7 + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '69' + Content-Type: + - application/x-www-form-urlencoded + Cookie: + - JSESSIONID=5B4E2181EB6B5D30BE8940F96845165E; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: POST + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/inicio/inicio.xhtml + response: + body: + string: '' + headers: + Content-Length: + - '0' + Date: + - Thu, 16 Jan 2020 20:16:58 GMT + Location: + - http://prepaid.dhl.com.mx/Prepago/jsp/app/login/login.xhtml + Server: + - Apache-Coyote/1.1 + X-Powered-By: + - JSF/1.2 + status: + code: 302 + message: Found +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Cookie: + - JSESSIONID=5B4E2181EB6B5D30BE8940F96845165E + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: GET + uri: http://prepaid.dhl.com.mx/Prepago/jsp/app/login/login.xhtml + response: + body: + string: '' + headers: + Connection: + - Keep-Alive + Content-Length: + - '0' + Location: + - https://prepaid.dhl.com.mx/Prepago/jsp/app/login/login.xhtml + Server: + - BigIP + status: + code: 302 + message: Found +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Cookie: + - JSESSIONID=5B4E2181EB6B5D30BE8940F96845165E; BIGipServerpl_prepaid.com.mx_80=1029802396.20480.0000 + User-Agent: + - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/75.0.3770.142 Safari/537.36 + method: GET + uri: https://prepaid.dhl.com.mx/Prepago/jsp/app/login/login.xhtml + response: + body: + string: "\n\n\n \n \n Login\ + \ / Admin\n \n \n \n \n \n \n \n \n \n\ + \
\n \n
\n\n \n
\n
\n \ + \ \n
\n
\n \"DHL\n
\n
\n\ + \ \n\n \n\n \n
\n
\n
\n\n\n \ + \
\n\n\n\n\n\n
\n\n\n\n\n\n\n\n\n\n\n\n\ +
Prepago\ + \ DHL
Debe autenticarse en el sistema para acceder
\n\n\n\n\n\n\ + \n\ + \n\n\n\n\n\ + \n\n\n
\n\n\n\n\n\ + \n\n\n\n\n\n
Usuario:
Contraseña:
\n
Recuperar Contraseña
\n\n\n\n\n\n\ + \n
\n
\n
\n
\n\n
\n
Recuperar Contraseña
\n
\n\n\n\n\n\n\n\n\n\n\n\n
Recuperación\ + \ de Contraseña
Usuario:
\n\"\
\"\"\n\n\n\n\n\n\n\ +
\n\n
new ModalPanel('pnlUsuario',\n\t\t\t\t{\n\t\t\t\ + \t\twidth: 400,\n\t\t\t\t\theight: 200,\n\n\t\t\t\t\tminWidth: -1,\n\t\t\t\ + \t\tminHeight: -1,\n\n\t\t\t\t\tresizeable: true,\n\t\t\t\t\tmoveable: true,\n\ + \n\t\t\t\t\tleft: \"auto\",\n\t\t\t\t\ttop: \"auto\",\n\n\t\t\t\t\tzindex:\ + \ 100,onresize: '',onmove: '',onshow: '',onhide: '',onbeforeshow: '',onbeforehide:\ + \ '',\n\t\t\t\t\tdomElementAttachment: \"\",\t\t\t\t\n\t\t\t\t\tkeepVisualState:\ + \ false,\n\t\t\t\t\tshowWhenRendered: false,\n\t\t\t\t\tselectBehavior: \"\ + disable\",\n\n\t\t\t\t\tautosized: false,\n\t\t\t\t\toverlapEmbedObjects:\ + \ false});
\n\ + \ \n \n \n\n \n \ + \ \n \n \n\n \n
\n \n \"Deutsche\n \n
\n\n \ + \ \n \n" + headers: + Content-Type: + - text/html;charset=UTF-8 + Date: + - Thu, 16 Jan 2020 20:16:58 GMT + Server: + - Apache-Coyote/1.1 + Set-Cookie: + - JSESSIONID=3EF51EF1AF93E06DDF9EF62700BDB64D; Path=/Prepago/; HttpOnly + Transfer-Encoding: + - chunked + X-Powered-By: + - JSF/1.2 + status: + code: 200 + message: OK +version: 1 diff --git a/tests/resources/test_create_guide.py b/tests/resources/test_create_guide.py new file mode 100644 index 0000000..3178c7c --- /dev/null +++ b/tests/resources/test_create_guide.py @@ -0,0 +1,10 @@ +import pytest + + +@pytest.mark.vcr +def test_get_guide(client, origin, destination, details): + guide_number, file_path = client.guides.create_guide( + origin, destination, details + ) + assert guide_number is not None + assert file_path is not None diff --git a/tests/test_client_login.py b/tests/test_client_login.py index edb818d..eb80510 100644 --- a/tests/test_client_login.py +++ b/tests/test_client_login.py @@ -1,14 +1,47 @@ import os import pytest +from bs4 import BeautifulSoup from dhlmex import Client +from dhlmex.exceptions import DhlmexException DHLMEX_USERNAME = os.environ['DHLMEX_USERNAME'] DHLMEX_PASSWORD = os.environ['DHLMEX_PASSWORD'] @pytest.mark.vcr -def test_successful_login(): +def test_successful_login(site_urls): # Just need to make sure it doesn't throw an exception - assert Client(DHLMEX_USERNAME, DHLMEX_PASSWORD) + client = Client(DHLMEX_USERNAME, DHLMEX_PASSWORD) + resp = client.get(site_urls['home']) + soup = BeautifulSoup(resp.text, features='html.parser') + client._logout() + assert resp.status_code == 200 + assert 'Administrar' in soup.find('title').text + + +@pytest.mark.vcr +def test_client_log_out(): + client = Client(DHLMEX_USERNAME, DHLMEX_PASSWORD) + resp = client._logout() + soup = BeautifulSoup(resp.text, features='html.parser') + assert resp.status_code == 200 + assert 'Administrar' not in soup.find('title').text + assert 'Login' in soup.find('title').text + + +@pytest.mark.vcr +def test_existing_session(site_urls): + client = Client(DHLMEX_USERNAME, DHLMEX_PASSWORD) + resp = client.get(site_urls['home']) + assert resp.status_code == 200 + + with pytest.raises(DhlmexException) as execinfo: + client = Client(DHLMEX_USERNAME, DHLMEX_PASSWORD) + assert ( + str(execinfo.value) + == f'There is an exisiting session on DHL for {DHLMEX_USERNAME}' + ) + + client._logout()