Last active
March 27, 2019 12:33
-
-
Save aino-prashant/6400517c62881406ed67b1b8a01ea320 to your computer and use it in GitHub Desktop.
Il centro image/pdf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<target-source url="http://digital.ilcentro.it/ilcentro/books/latinaoggi/" edition="pescara" publication-id="22" publication-name="IlCentro"> | |
<execution-element type="flow"> | |
<execution-element type="act"> | |
<locator type="IFRAME_NAME" value="iframe_login" /> | |
<action-type>SWITCHFRAME</action-type> | |
<key /> | |
</execution-element> | |
<execution-element type="data-put"> | |
<locator type="XPATH" value="//input[@id='input_username']" /> | |
<attribute-value>amministrazione@p-review.it</attribute-value> | |
<property>TEXT</property> | |
</execution-element> | |
<execution-element type="data-put"> | |
<locator type="XPATH" value="//input[@id='input_password']" /> | |
<attribute-value>12681870155</attribute-value> | |
<property>TEXT</property> | |
</execution-element> | |
<execution-element type="act"> | |
<locator type="XPATH" value="//*[@id="login_form"]/p[6]" /> | |
<action-type>CLICK</action-type> | |
<key /> | |
</execution-element> | |
<execution-element type="If"> | |
<condition expression-type="XPATH" expression="boolean(//*[@id="activate"]/a)" /> | |
<then-execution type="flow"> | |
<execution-element type="act"> | |
<locator type="XPATH" value="//*[@id="activate"]/a" /> | |
<action-type>CLICK</action-type> | |
<key /> | |
</execution-element> | |
</then-execution> | |
<else-execution /> | |
</execution-element> | |
<execution-element type="If"> | |
<condition expression-type="CLASSNAME" expression="vc-tooltip" /> | |
<then-execution type="flow"> | |
<execution-element type="act"> | |
<locator type="ID" value="pages" /> | |
<action-type>CLICK</action-type> | |
<key /> | |
</execution-element> | |
</then-execution> | |
<else-execution /> | |
</execution-element> | |
<execution-element type="for-each"> | |
<iterator-locator type="XPATH" value="//*[@id="thumbcont"]/ul/li[@data-page]" /> | |
<repeat-execution type="flow"> | |
<execution-element type="If"> | |
<condition expression-type="XPATH" expression="//*[@id="thumbcont"]/ul/li[@data-page='{{@context.currentIterationIndex}}']" /> | |
<then-execution type="flow"> | |
<execution-element type="act"> | |
<locator type="ID" value="articles" /> | |
<action-type>CLICK</action-type> | |
<key /> | |
</execution-element> | |
<execution-element type="data-fetch"> | |
<locator type="LOCAL_CONTEXT" value="currentIteratorValue" /> | |
<property>data-page</property> | |
<result-handler type="context" store-as="currentPageNumber" store-in="LOCAL_CONTEXT" /> | |
</execution-element> | |
<execution-element type="server-op" operation-signature="Entities_saveEntity"> | |
<param name="entity" order="1"> | |
<value type="entity" entity-type="content" service-name="eXtrapola"> | |
<entity-property name="date"> | |
<property-value type="data-fetch"> | |
<locator type="CLASSNAME" value="dataedizione" /> | |
<property>TEXT</property> | |
<result-handler /> | |
</property-value> | |
<type-as>DATE</type-as> | |
</entity-property> | |
<entity-property name="convertedOn"> | |
<property-value type="data-fetch"> | |
<locator type="LOCAL_CONTEXT" value="{{currentDateTime}}" /> | |
<property /> | |
<result-handler /> | |
</property-value> | |
<type-as>DATE</type-as> | |
</entity-property> | |
<entity-property name="downloadedOn"> | |
<property-value type="data-fetch"> | |
<locator type="LOCAL_CONTEXT" value="{{currentDateTime}}" /> | |
<property /> | |
<result-handler /> | |
</property-value> | |
<type-as /> | |
</entity-property> | |
<entity-property name="sourceId"> | |
<property-value type="data-fetch"> | |
<locator type="LOCAL_CONTEXT" value="IlCentroPublicationId" /> | |
<property /> | |
<result-handler /> | |
</property-value> | |
<type-as>INTEGER</type-as> | |
</entity-property> | |
<entity-property name="editionCode"> | |
<property-value type="data-fetch"> | |
<locator type="LOCAL_CONTEXT" value="currentEdition" /> | |
<property /> | |
<result-handler /> | |
</property-value> | |
<type-as>STRING</type-as> | |
</entity-property> | |
<entity-property name="pageNumber"> | |
<property-value type="data-fetch"> | |
<locator type="LOCAL_CONTEXT" value="currentIteratorValue" /> | |
<property>data-page</property> | |
<result-handler /> | |
</property-value> | |
<type-as>STRING</type-as> | |
</entity-property> | |
<entity-property name="sourceBlobid"> | |
<property-value type="url" value="http://digital.ilcentro.it/ilcentro/books/pescara/{{currentYear}}/{{currentdate}}pescara/images/thumbnails/Page-{{@context.currentPageNumber}}.jpg" download-url="true"> | |
<parameter /> | |
</property-value> | |
<type-as>BLOB</type-as> | |
</entity-property> | |
</value> | |
</param> | |
<result-handler type="context" store-as="currentPageId" store-in="LOCAL_CONTEXT" /> | |
</execution-element> | |
<execution-element type="for-each"> | |
<iterator-locator type="CLASSNAME" value="article_title" /> | |
<repeat-execution type="flow"> | |
<execution-element type="act"> | |
<locator type="IFRAME_NAME" value="shadowbox_content" /> | |
<action-type>SWITCHFRAME</action-type> | |
<key /> | |
</execution-element> | |
<execution-element type="server-op" operation-signature="Entities_saveEntity"> | |
<param name="entity" order="1"> | |
<value type="entity" entity-type="article" service-name="eXtrapola"> | |
<entity-property name="title"> | |
<property-value type="data-fetch"> | |
<locator type="CSS_SELECTOR" value="h1.titolo_articolo.titolo" /> | |
<property>TEXT</property> | |
<result-handler /> | |
</property-value> | |
<type-as>STRING</type-as> | |
</entity-property> | |
<entity-property name="subTitle"> | |
<property-value type="data-fetch"> | |
<locator type="CSS_SELECTOR" value="h2.sottotitolo_articolo.sottotitolo" /> | |
<property>TEXT</property> | |
<result-handler /> | |
</property-value> | |
<type-as>STRING</type-as> | |
</entity-property> | |
<entity-property name="contentBlobId"> | |
<property-value type="data-fetch"> | |
<locator type="CLASSNAME" value="testo_articolo" /> | |
<property>TEXT</property> | |
<result-handler /> | |
</property-value> | |
<type-as>BLOB</type-as> | |
</entity-property> | |
<entity-property name="guid"> | |
<property-value type="data-fetch"> | |
<locator type="GUID_GENERATOR" /> | |
<property /> | |
<result-handler /> | |
</property-value> | |
<type-as>STRING</type-as> | |
</entity-property> | |
<entity-property name="pageId"> | |
<property-value type="data-fetch"> | |
<locator type="LOCAL_CONTEXT" value="currentPageId" /> | |
<property /> | |
<result-handler /> | |
</property-value> | |
<type-as>INTEGER</type-as> | |
</entity-property> | |
</value> | |
</param> | |
<result-handler /> | |
</execution-element> | |
<execution-element type="act"> | |
<locator type="IFRAME_NAME" value="iframe_login" /> | |
<action-type>SWITCHFRAMEDEFAULT</action-type> | |
<key /> | |
</execution-element> | |
<execution-element type="act"> | |
<locator type="XPATH" value="//*[@id="shadowbox_nav_close"]" /> | |
<action-type>CLICK</action-type> | |
<key /> | |
</execution-element> | |
<execution-element type="If"> | |
<condition expression-type="ID" expression="textual_articles" /> | |
<then-execution /> | |
<else-execution type="flow"> | |
<execution-element type="act"> | |
<locator type="ID" value="articles" /> | |
<action-type>CLICK</action-type> | |
<key /> | |
</execution-element> | |
</else-execution> | |
</execution-element> | |
</repeat-execution> | |
</execution-element> | |
<execution-element type="If"> | |
<condition expression-type="CLASSNAME" expression="vc-tooltip" /> | |
<then-execution type="flow"> | |
<execution-element type="act"> | |
<locator type="ID" value="pages" /> | |
<action-type>CLICK</action-type> | |
<key /> | |
</execution-element> | |
</then-execution> | |
<else-execution /> | |
</execution-element> | |
</then-execution> | |
<else-execution type="flow"> | |
<execution-element type="server-op" operation-signature="eXtrapola_mergeWithExistingPage"> | |
<param name="savedPageId" order="0"> | |
<value type="data-fetch"> | |
<locator type="LOCAL_CONTEXT" value="currentPageId" /> | |
<property /> | |
<result-handler /> | |
</value> | |
</param> | |
<param name="newPageNumber" order="1"> | |
<value type="data-fetch"> | |
<locator type="LOCAL_CONTEXT" value="currentIterationIndex" /> | |
<property /> | |
<result-handler /> | |
</value> | |
</param> | |
<param name="newSourceBlobId" order="2"> | |
<value type="url" value="http://digital.ilcentro.it/ilcentro/books/pescara/{{currentYear}}/{{currentdate}}pescara/images/thumbnails/Page-{{@context.currentIterationIndex}}.jpg" download-url="true" /> | |
</param> | |
<result-handler /> | |
</execution-element> | |
<execution-element type="act"> | |
<locator type="ID" value="pages" /> | |
<action-type>CLICK</action-type> | |
<key /> | |
</execution-element> | |
</else-execution> | |
</execution-element> | |
</repeat-execution> | |
</execution-element> | |
</execution-element> | |
</target-source> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<li data-page="2" style="display: list-item;" class="active"> | |
<img src="images/thumbnails/Thumb-2.jpg" alt=" Vai a Pagina 2" title=" Vai a Pagina 2" id="pag2" onclick="isSwipe(this);location.href = '#2';"> | |
</li> |
we can achieve this also like
http://digital.ilcentro.it/ilcentro/books/pescara/2019/20190320pescara/images/Pages/Page-1.jpg
Very interesting! Good find Prashant - seems like a much straightforward way to work with images than what we had earlier thought.
Good job @aino-nairutee & @aino-prashant
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
as we can see above li element has a tag img and attribute name src.
eg. selenium code look like this
String url=webElement.findElement(By.tagName("img")).getAttribute("src");
will get url like
http://digital.ilcentro.it/ilcentro/books/pescara/2019/20190320pescara/images/thumbnails/Thumb-1.jpg
change Thumb to Page
http://digital.ilcentro.it/ilcentro/books/pescara/2019/20190320pescara/images/thumbnails/Page-1.jpg