Skip to content

Commit 860ded2

Browse files
reworked create_address_profile to fix error
1 parent 4df6e7d commit 860ded2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

modules/page_object_prefs.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ def set_country_autofill_panel(self, country: str) -> BasePage:
9494
select_country.select_by_value(country)
9595
return self
9696

97-
def extract_content_from_html(self, initial_string: str) -> AutofillAddressBase:
97+
@staticmethod
98+
def extract_content_from_html(initial_string: str) -> str:
9899
"""
99100
Takes the raw innerHTML and uses regex to filter out the tags.
100101
@@ -114,7 +115,8 @@ def extract_content_from_html(self, initial_string: str) -> AutofillAddressBase:
114115
clean_text = [s[1:-1] for s in text]
115116
return clean_text[0]
116117

117-
def extract_and_split_text(self, text: str) -> List[str]:
118+
@staticmethod
119+
def extract_and_split_text(text: str) -> List[str]:
118120
"""
119121
Takes the raw text and strips it of any extra spaces and splits it by the character ','
120122
@@ -125,7 +127,8 @@ def extract_and_split_text(self, text: str) -> List[str]:
125127
"""
126128
return [item.strip() for item in text.split(",")]
127129

128-
def organize_data_into_obj(self, observed_text: List[str]) -> AutofillAddressBase:
130+
@staticmethod
131+
def organize_data_into_obj(observed_text: List[str]) -> AutofillAddressBase | None:
129132
"""
130133
Takes a list of text that has been split into an array and instantiates an AutofillAddressBase object
131134

0 commit comments

Comments
 (0)