Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Luciano Barletta
/
Pruebas-RTO
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit a4574a98
authored
2024-06-18 12:32:44 -0300
by
Tu Nombre
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Traigo differencia y efecacia de freenos
1 parent
40f443be
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
7 deletions
iselenium.py
main.py
iselenium.py
View file @
a4574a9
...
...
@@ -54,6 +54,18 @@ class SeleniumInterface:
return
array
[
0
]
return
array
def
traerTextDiv
(
self
,
Id
,
No
=
"?"
):
try
:
div
=
self
.
driver
.
find_element
(
By
.
ID
,
Id
)
text
=
div
.
text
if
text
:
return
text
else
:
return
No
except
Exception
as
E
:
print
(
f
"Error en traerTextDiv {id}, {str(E)}"
)
return
No
def
write
(
self
,
element
,
keys
,
clear
=
True
):
if
clear
:
...
...
main.py
View file @
a4574a9
...
...
@@ -198,14 +198,16 @@ def report():
return
f
"Error yendo a las especificaciones técnicas del dominio '{plate}'. {str(E)}"
try
:
answer
=
readdata
(
s
,
answer
)
except
:
s
.
driver
.
quit
()
return
f
"Error leyendo datos de la patente '{plate}'."
try
:
answer
=
rnddata
(
answer
)
except
:
except
Exception
as
E
:
s
.
driver
.
quit
()
return
f
"Error completando datos extra de la patente '{plate}'."
print
(
answer
)
print
(
s
)
return
f
"Error leyendo datos de la patente '{plate}' {str(E)}."
#try:
# answer = rnddata(answer)
#except:
# s.driver.quit()
# return f"Error completando datos extra de la patente '{plate}'."
#print(answer)
answer
[
'header'
][
"hora"
]
=
str
(
fingfd
)
...
...
@@ -276,6 +278,8 @@ def gotoadmin(s, r):
return
r
######################Cambio DBA ruido
def
readdata
(
s
,
r
):
reach
=
lambda
id
:
lambda
s
:
s
.
readInput
(
s
.
find
(
s
.
By
.
ID
,
id
)
)
...
...
@@ -301,6 +305,8 @@ def readdata(s, r):
fre
[
f
'peso_estatico_{i + 1}'
]
=
_e2q
(
_attempt
(
reach
(
f
"pesoBascula-{i}"
),
"?"
)(
s
))
fre
[
f
'fuerza_izquierda_{i + 1}'
]
=
_e2q
(
_attempt
(
reach
(
f
"fuerzaIzq-{i}"
),
"?"
)(
s
))
fre
[
f
'fuerza_derecha_{i + 1}'
]
=
_e2q
(
_attempt
(
reach
(
f
"fuerzaDer-{i}"
),
"?"
)(
s
))
fre
[
f
'diferencia_freno_{i + 1}'
]
=
s
.
traerTextDiv
(
f
"remotoDivDiferencia-{i}"
)
fre
[
f
'eficacia_freno_{i + 1}'
]
=
s
.
traerTextDiv
(
f
"remotoDivEficiencia-{i}"
)
r
[
'frenos'
]
.
update
(
fre
)
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment