made the steam language challenge dynamic depending on the language
This commit is contained in:
parent
6b9d3c27e3
commit
6be02b29c8
2 changed files with 8 additions and 2 deletions
|
@ -230,7 +230,13 @@ class WebMission(BaseSurvey):
|
||||||
self._success()
|
self._success()
|
||||||
|
|
||||||
page = self.browser.web.page()
|
page = self.browser.web.page()
|
||||||
page.runJavaScript(self.check_condition, resultCallback=check_callback)
|
|
||||||
|
# preprocess the condition
|
||||||
|
condition = self.check_condition
|
||||||
|
condition = condition.replace("#LANGUAGE_CODE#", translate.get_language())
|
||||||
|
|
||||||
|
# run the condition
|
||||||
|
page.runJavaScript(condition, resultCallback=check_callback)
|
||||||
|
|
||||||
# data collection
|
# data collection
|
||||||
|
|
||||||
|
|
|
@ -167,7 +167,7 @@
|
||||||
"sp": "Cambiar el idioma a Español."
|
"sp": "Cambiar el idioma a Español."
|
||||||
},
|
},
|
||||||
"url": "https://store.steampowered.com/",
|
"url": "https://store.steampowered.com/",
|
||||||
"check": "document.getElementsByTagName('html')[0].lang == 'fr'",
|
"check": "document.getElementsByTagName('html')[0].lang == '#LANGUAGE_CODE#'",
|
||||||
"skip_time": 60
|
"skip_time": 60
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue