def setUpClass(self): #self.driver = webdriver.Firefox() print settings.rel('../../mac/chromedriver') self.driver = webdriver.Chrome(settings.rel('../../mac/chromedriver')) #print settings.rel('../../ubuntu/chromedriver') #self.driver = webdriver.Chrome(settings.rel('../../ubuntu/chromedriver')) self.base_url = 'http://localhost:8000/static/index.html#view=assignments'
def test_sortable(self): with open(settings.rel('../html_app/js/jquery-1.7.2.js')) as jquery_js_2: jquery = jquery_js_2.read() self.driver.execute_script(jquery) with open(settings.rel('jquery.simulate.drag-sortable.js')) as jquery_js_3: jquery_drag = jquery_js_3.read() self.driver.execute_script(jquery_drag) #Need this library to be injected beyond the jquery to make sure you don't get errors for the other selectors with open(settings.rel('../html_app/js/jquery.ba-bbq.min.js')) as jquery_js_4: jquery_bbq = jquery_js_4.read() self.driver.execute_script(jquery_bbq) script = "$($('.scb_s_western_blot_choose_samples_list_item')[0]).simulateDragSortable({ move: 1 });" success = self.driver.execute_script(script)
def test_sortable(self): with open( settings.rel('../html_app/js/jquery-1.7.2.js')) as jquery_js_2: jquery = jquery_js_2.read() self.driver.execute_script(jquery) with open(settings.rel( 'jquery.simulate.drag-sortable.js')) as jquery_js_3: jquery_drag = jquery_js_3.read() self.driver.execute_script(jquery_drag) #Need this library to be injected beyond the jquery to make sure you don't get errors for the other selectors with open(settings.rel( '../html_app/js/jquery.ba-bbq.min.js')) as jquery_js_4: jquery_bbq = jquery_js_4.read() self.driver.execute_script(jquery_bbq) script = "$($('.scb_s_western_blot_choose_samples_list_item')[0]).simulateDragSortable({ move: 1 });" success = self.driver.execute_script(script)