How to use illuminare method in SeleniumBase

Best Python code snippet using SeleniumBase

italian.py

Source:italian.py Github

copy

Full Screen

...129 return self.switch_to_window(*args, **kwargs)130 def passa_alla_finestra_predefinita(self, *args, **kwargs):131 # switch_to_default_window()132 return self.switch_to_default_window(*args, **kwargs)133 def illuminare(self, *args, **kwargs):134 # highlight(selector)135 return self.highlight(*args, **kwargs)136 def illuminare_clic(self, *args, **kwargs):137 # highlight_click(selector)138 return self.highlight_click(*args, **kwargs)139 def scorrere_fino_a(self, *args, **kwargs):140 # scroll_to(selector)141 return self.scroll_to(*args, **kwargs)142 def scorri_verso_alto(self, *args, **kwargs):143 # scroll_to_top()144 return self.scroll_to_top(*args, **kwargs)145 def scorri_verso_il_basso(self, *args, **kwargs):146 # scroll_to_bottom()147 return self.scroll_to_bottom(*args, **kwargs)...

Full Screen

Full Screen

interrupt_play.py

Source:interrupt_play.py Github

copy

Full Screen

1#!/usr/bin/env python32#3#Author: Giovanni Rasera Per Cynexo4#Date: 2021 03 225#Behavior: Lo script crea due thread 6# 1 - Ascolta in interrupt la GPIO del bottone per far partire un suono7# 2 - Fa illuminare dei led a ciclo8#9from periphery import GPIO10import sys11import wave12import getopt13import signal14import alsaaudio15import threading16import time17#GPIO Specifico della scheda Cynexo18class CynexoGPIO():19 def __init__(self):20 self.gpio_FBtn = GPIO("/dev/gpiochip4", 12, "in")21 self.gpio_FBtn.edge = "falling"22 self.gpio_green = GPIO("/dev/gpiochip1", 24, "out")23 self.gpio_red = GPIO("/dev/gpiochip1", 25, "out")24 self.gpio_blue = GPIO("/dev/gpiochip2", 23, "out")25 26 def close(self):27 self.gpio_green.write(False)28 self.gpio_red.write(False)29 self.gpio_blue.write(False)30 self.gpio_FBtn.close()31 self.gpio_green.close()32 self.gpio_red.close()33 self.gpio_blue.close()34Cy_Board = CynexoGPIO()35#Ctrl+C36def signal_handler(sig, frame):37 print('Stop: Ctrl+C!')38 #Chiudere la Scheda e ritornare le risorse al sistema39 Cy_Board.close()40 sys.exit(0)41signal.signal(signal.SIGINT, signal_handler)42#Interrut per far partire la musica43class InterruptButton(threading.Thread):44 def __init__(self, threadID, name, board):45 threading.Thread.__init__(self)46 self.button = board.gpio_FBtn47 self.threadID = threadID48 self.name = name49 def play(self, data, periodsize, device, f):50 #Leggi e suona51 while data:52 device.write(data)53 data = f.readframes(periodsize)54 def run(self):55 f = wave.open(args[0], 'rb')56 periodsize = f.getframerate() // 857 device = alsaaudio.PCM()58 while(True):59 #Prebuffering60 data = f.readframes(periodsize)61 #Interrupt62 print("Interrupt Button:")63 self.button.read_event() 64 #Play65 self.play(data, periodsize, device, f)66 f.close()67 f = wave.open(args[0], 'rb')68#RGB69class RGBCicle(threading.Thread):70 def __init__(self, threadID, name, board):71 threading.Thread.__init__(self)72 self.gpio_green = board.gpio_green73 self.gpio_red = board.gpio_red74 self.gpio_blue = board.gpio_blue 75 self.threadID = threadID76 self.name = name77 78 def run(self):79 while(True):80 self.gpio_green.write(False)81 self.gpio_red.write(True)82 self.gpio_blue.write(False)83 time.sleep(1)84 self.gpio_green.write(False)85 self.gpio_red.write(False)86 self.gpio_blue.write(True)87 time.sleep(1)88 self.gpio_green.write(True)89 self.gpio_red.write(False)90 self.gpio_blue.write(False)91 time.sleep(1)92 93def usage():94 print('usage: playwav.py <file>', file=sys.stderr)95 sys.exit(2)96#Main97if __name__ == '__main__':98 device = 'default'99 opts, args = getopt.getopt(sys.argv[1:], 'd:')100 #Come usare101 if not args:102 usage()103 #Threading104 threadButton = InterruptButton(1, "Interrupt Button", Cy_Board)105 threadOther = RGBCicle(2, "RGB", Cy_Board)106 threadButton.start()...

Full Screen

Full Screen

movement.py

Source:movement.py Github

copy

Full Screen

1#import linuxcnc2#move here and there to move cassetti3#to illuminare slot4#to check how alto a cassetto is...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run SeleniumBase automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful