Anne31415 commited on
Commit
712c0cb
·
1 Parent(s): 48a4a46

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -7
app.py CHANGED
@@ -174,6 +174,7 @@ def main():
174
  askButton = document.querySelector('button:contains("Ask")');
175
  }
176
  if (askButton) {
 
177
  askButton.click();
178
  } else {
179
  console.error('Ask button not found');
@@ -182,26 +183,32 @@ def main():
182
 
183
  document.getElementById('question1').onclick = function() {
184
  console.log('Question 1 clicked');
185
- document.querySelectorAll('div.stTextInput input')[0].value = 'Was genau ist ein Belegarzt?';
186
- document.querySelectorAll('div.stTextInput input')[0].dispatchEvent(new Event('change'));
 
 
187
  clickAskButton();
188
  };
189
  document.getElementById('question2').onclick = function() {
190
  console.log('Question 2 clicked');
191
- document.querySelectorAll('div.stTextInput input')[0].value = 'Wofür wird die Alpha-ID verwendet?';
192
- document.querySelectorAll('div.stTextInput input')[0].dispatchEvent(new Event('change'));
 
 
193
  clickAskButton();
194
  };
195
  document.getElementById('question3').onclick = function() {
196
  console.log('Question 3 clicked');
197
- document.querySelectorAll('div.stTextInput input')[0].value = 'Was sind die Vorteile des ambulanten operierens?';
198
- document.querySelectorAll('div.stTextInput input')[0].dispatchEvent(new Event('change'));
 
 
199
  clickAskButton();
200
  };
201
  </script>
202
  """, unsafe_allow_html=True)
203
 
204
-
205
 
206
 
207
  if __name__ == "__main__":
 
174
  askButton = document.querySelector('button:contains("Ask")');
175
  }
176
  if (askButton) {
177
+ console.log('Ask button found', askButton);
178
  askButton.click();
179
  } else {
180
  console.error('Ask button not found');
 
183
 
184
  document.getElementById('question1').onclick = function() {
185
  console.log('Question 1 clicked');
186
+ let inputElement = document.querySelectorAll('div.stTextInput input')[0];
187
+ console.log('Input Element:', inputElement);
188
+ inputElement.value = 'Was genau ist ein Belegarzt?';
189
+ inputElement.dispatchEvent(new Event('change'));
190
  clickAskButton();
191
  };
192
  document.getElementById('question2').onclick = function() {
193
  console.log('Question 2 clicked');
194
+ let inputElement = document.querySelectorAll('div.stTextInput input')[0];
195
+ console.log('Input Element:', inputElement);
196
+ inputElement.value = 'Wofür wird die Alpha-ID verwendet?';
197
+ inputElement.dispatchEvent(new Event('change'));
198
  clickAskButton();
199
  };
200
  document.getElementById('question3').onclick = function() {
201
  console.log('Question 3 clicked');
202
+ let inputElement = document.querySelectorAll('div.stTextInput input')[0];
203
+ console.log('Input Element:', inputElement);
204
+ inputElement.value = 'Was sind die Vorteile des ambulanten operierens?';
205
+ inputElement.dispatchEvent(new Event('change'));
206
  clickAskButton();
207
  };
208
  </script>
209
  """, unsafe_allow_html=True)
210
 
211
+
212
 
213
 
214
  if __name__ == "__main__":