intial working window mode in screenDriver
This commit is contained in:
parent
455aacf834
commit
26e3057ab1
@ -79,7 +79,7 @@ device=all
|
||||
grabDevices=True
|
||||
ignoreShortcuts=False
|
||||
# the current shortcut layout located in /etc/fenrir/keyboard
|
||||
keyboardLayout=test
|
||||
keyboardLayout=desktop
|
||||
# echo chars while typing.
|
||||
charEcho=False
|
||||
# echo deleted chars
|
||||
|
@ -124,7 +124,6 @@ class driver():
|
||||
# changes on the screen
|
||||
oldScreenText = self.env['runtime']['screenManager'].getWindowAreaInText(self.env['screenData']['oldContentText'])
|
||||
newScreenText = self.env['runtime']['screenManager'].getWindowAreaInText(self.env['screenData']['newContentText'])
|
||||
print(newScreenText)
|
||||
if (self.env['screenData']['oldContentText'] != self.env['screenData']['newContentText']) and \
|
||||
(self.env['screenData']['newContentText'] != '' ):
|
||||
if oldScreenText == '' and\
|
||||
@ -139,10 +138,11 @@ class driver():
|
||||
diff = difflib.ndiff(self.env['screenData']['oldContentText'][diffStart:diffStart + self.env['screenData']['columns']],\
|
||||
self.env['screenData']['newContentText'][diffStart:diffStart + self.env['screenData']['columns']])
|
||||
else:
|
||||
diff = difflib.ndiff( oldScreenText[diffStart:].split('\n'),\
|
||||
newScreenText[diffStart:].split('\n'))
|
||||
|
||||
diffList = list(diff)
|
||||
diff = difflib.ndiff( oldScreenText[0:].split('\n'),\
|
||||
newScreenText[0:].split('\n'))
|
||||
|
||||
diffList = list(diff)
|
||||
|
||||
self.env['screenData']['newDelta'] = ''.join(x[2:] for x in diffList if x.startswith('+ '))
|
||||
self.env['screenData']['newNegativeDelta'] = ''.join(x[2:] for x in diffList if x.startswith('- '))
|
||||
print(self.env['screenData']['newDelta'])
|
||||
|
Loading…
Reference in New Issue
Block a user