1

I am trying to automate a web app using Selenium Webdriver. The app involves user opening a book which is rendered in either PDF or ePub format, it allows user to highlight the text which they prefer. I am having difficulty in creating steps for the action where user selects text and highlights it.

PS : Once the text is selected from front end, the system makes a backend call.

  • Recording? Are you using Selenium IDE? – demouser123 Jan 25 '16 at 18:50
  • Webdriver. Didn't mean that recording. Apologies. – Sankalp Bajpai Jan 25 '16 at 19:33
1

PDFs and ePubs are shown in the browser with plugins. Selenium cannot access these documents.

If you use Windows you could have a try with AutoIt. On Linux and Macs I think you have to fallback to something like Sikuli after the document is opened.

Some reads:

|improve this answer|||||
  • Thank you but I don't think this is what I am trying to achieve, my aim is to highlight a text inside an e-Reader. The e-Reader, renders the books a user has saved in his personal library in PDF or ePub format. The link that you shared automates, the process of opening a PDF document. – Sankalp Bajpai Jan 25 '16 at 23:24
  • Maybe not, but the point is you cannot access the PDF/ePub with Selenium. You need to use another tool to select the PDF content. For example AutoIt, although the example blog post might not do what you exactly want they should be able to direct you in the right direction to solve it yourself. – Niels van Reijmersdal Jan 26 '16 at 7:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.