

from telemetry import story
from telemetry.page import page as page_module
from telemetry.page import shared_page_state


class SkiaDesktopPage(page_module.Page):

  def __init__(self, url, page_set):
    super(SkiaDesktopPage, self).__init__(
        url=url,
        name=url,
        page_set=page_set,
        shared_page_state_class=shared_page_state.SharedDesktopPageState)
    self.archive_data_file = 'data/skia_ebay_desktop.json'

  def RunNavigateSteps(self, action_runner):
    action_runner.Navigate(self.url)
    action_runner.Wait(15)


class SkiaEbayDesktopPageSet(story.StorySet):
  """ Pages designed to represent the median, not highly optimized web """

  def __init__(self):
    super(SkiaEbayDesktopPageSet, self).__init__(
      archive_data_file='data/skia_ebay_desktop.json')

    urls_list = [
      # go/skia-skps-3-2019
      'http://www.ebay.com',
    ]

    for url in urls_list:
      self.AddStory(SkiaDesktopPage(url, self))


from telemetry import story
from telemetry.page import page as page_module
from telemetry.page import shared_page_state


class SkiaDesktopPage(page_module.Page):

  def __init__(self, url, page_set):
    super(SkiaDesktopPage, self).__init__(
        url=url,
        name=url,
        page_set=page_set,
        shared_page_state_class=shared_page_state.SharedDesktopPageState)
    self.archive_data_file = 'data/skia_ebay_desktop.json'

  def RunNavigateSteps(self, action_runner):
    action_runner.Navigate(self.url, timeout_in_seconds=120)


class SkiaEbayDesktopPageSet(story.StorySet):
  """ Pages designed to represent the median, not highly optimized web """

  def __init__(self):
    super(SkiaEbayDesktopPageSet, self).__init__(
      archive_data_file='data/skia_ebay_desktop.json')

    urls_list = [
      # go/skia-skps-3-2019
      'http://www.ebay.com',
    ]

    for url in urls_list:
      self.AddStory(SkiaDesktopPage(url, self))

Add wait time to ebay pageset
Add wait time to ebay pageset

Bug: skia:11898
Change-Id: I0bb58f1d8e9c6ad48148d50b840f152fc158f071
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/400538
Reviewed-by: Ravi Mistry <9fa2e7438b8cb730f96b74865492597170561628@google.com>
Commit-Queue: Ravi Mistry <9fa2e7438b8cb730f96b74865492597170561628@google.com>

  
  
  from telemetry import story
  from telemetry.page import page as page_module
  from telemetry.page import shared_page_state
  
  
  class SkiaDesktopPage(page_module.Page):
  
    def __init__(self, url, page_set):
      super(SkiaDesktopPage, self).__init__(
          url=url,
          name=url,
          page_set=page_set,
          shared_page_state_class=shared_page_state.SharedDesktopPageState)
      self.archive_data_file = 'data/skia_ebay_desktop.json'
  
    def RunNavigateSteps(self, action_runner):
-     action_runner.Navigate(self.url)
+     action_runner.Navigate(self.url, timeout_in_seconds=120)
-     action_runner.Wait(15)
  
  
  class SkiaEbayDesktopPageSet(story.StorySet):
    """ Pages designed to represent the median, not highly optimized web """
  
    def __init__(self):
      super(SkiaEbayDesktopPageSet, self).__init__(
        archive_data_file='data/skia_ebay_desktop.json')
  
      urls_list = [
        # go/skia-skps-3-2019
        'http://www.ebay.com',
      ]
  
      for url in urls_list:
        self.AddStory(SkiaDesktopPage(url, self))
+ 
Add wait time to ebay pageset
## Code Before:


from telemetry import story
from telemetry.page import page as page_module
from telemetry.page import shared_page_state


class SkiaDesktopPage(page_module.Page):

  def __init__(self, url, page_set):
    super(SkiaDesktopPage, self).__init__(
        url=url,
        name=url,
        page_set=page_set,
        shared_page_state_class=shared_page_state.SharedDesktopPageState)
    self.archive_data_file = 'data/skia_ebay_desktop.json'

  def RunNavigateSteps(self, action_runner):
    action_runner.Navigate(self.url)
    action_runner.Wait(15)


class SkiaEbayDesktopPageSet(story.StorySet):
  """ Pages designed to represent the median, not highly optimized web """

  def __init__(self):
    super(SkiaEbayDesktopPageSet, self).__init__(
      archive_data_file='data/skia_ebay_desktop.json')

    urls_list = [
      # go/skia-skps-3-2019
      'http://www.ebay.com',
    ]

    for url in urls_list:
      self.AddStory(SkiaDesktopPage(url, self))
## Instruction:
Add wait time to ebay pageset
## Code After:


from telemetry import story
from telemetry.page import page as page_module
from telemetry.page import shared_page_state


class SkiaDesktopPage(page_module.Page):

  def __init__(self, url, page_set):
    super(SkiaDesktopPage, self).__init__(
        url=url,
        name=url,
        page_set=page_set,
        shared_page_state_class=shared_page_state.SharedDesktopPageState)
    self.archive_data_file = 'data/skia_ebay_desktop.json'

  def RunNavigateSteps(self, action_runner):
    action_runner.Navigate(self.url, timeout_in_seconds=120)


class SkiaEbayDesktopPageSet(story.StorySet):
  """ Pages designed to represent the median, not highly optimized web """

  def __init__(self):
    super(SkiaEbayDesktopPageSet, self).__init__(
      archive_data_file='data/skia_ebay_desktop.json')

    urls_list = [
      # go/skia-skps-3-2019
      'http://www.ebay.com',
    ]

    for url in urls_list:
      self.AddStory(SkiaDesktopPage(url, self))
