title: Can't go on clicking on the next page button while scraping certain fields from a website
body: <p>I've created a script using python in association with <strong><em><a href="https://miyakogi.github.io/pyppeteer/" rel="nofollow noreferrer">pyppeteer</a></em></strong> to keep clicking on the next page button until there is no more. The script while clicking on the next page button throws this error <code>pyppeteer.errors.TimeoutError: Navigation Timeout Exceeded: 30000 ms exceeded.</code> pointing at this line <code>await page.waitForNavigation()</code>. It can parse <code>name</code> and <code>item_type</code> from the landing page of that site, though. I know I can issue post http requests with appropriate payload to get data from there but my intention is to make use of <code>pyppeteer</code> and keep clicking on the next page button while parsing the required fields.</p>
  
  <blockquote>
    <p><a href="https://www.e-ports.com/ships" rel="nofollow noreferrer">website address</a></p>
  </blockquote>
  
  <pre><code>import asyncio
  from pyppeteer import launch
  
  link = "https://www.e-ports.com/ships"
  
  async def get_content():
      wb = await launch(headless=True)
      [page] = await wb.pages()
      await page.goto(link)
  
      while True:
          await page.waitForSelector(".common_card", {'visible':True})
  
          elements = await page.querySelectorAll('.common_card')
          for element in elements:
              name = await element.querySelectorEval('span.title &gt; a','e =&gt; e.innerText')
              item_type = await element.querySelectorEval('.bottom &gt; span','e =&gt; e.innerText')
              print(name.strip(),item_type.strip())
  
          try:
              await page.click("button.btn-next")
              await page.waitForNavigation()
          except Exception: break
  
  if __name__ == '__main__':
      loop = asyncio.get_event_loop()
      loop.run_until_complete(get_content())
  </code></pre>
  
  <p>Btw, If I manually click on the next page button for the first time, It accomplishes the rest successfully.</p>