1# Copyright (c) 2014 The Chromium Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5import urlparse 6 7import linksyse2000_ap_configurator 8 9 10class LinksysWRT320APConfigurator( 11 linksyse2000_ap_configurator.Linksyse2000APConfigurator): 12 """Base class for objects to configure Linksys WRT 320 access points 13 using webdriver.""" 14 15 def navigate_to_page(self, page_number): 16 if page_number == 1: 17 page_url = urlparse.urljoin(self.admin_interface_url, 18 'Wireless_Basic.asp') 19 self.get_url(page_url, page_title='Settngs') 20 elif page_number == 2: 21 page_url = urlparse.urljoin(self.admin_interface_url, 22 'WL_WPATable.asp') 23 self.get_url(page_url, page_title='Security') 24 else: 25 raise RuntimeError('Invalid page number passed. Number of pages ' 26 '%d, page value sent was %d' % 27 (self.get_number_of_pages(), page_number)) 28