Skip to content

Commit ab81f0d

Browse files
committed
fix: simplify outer HTML retrieval for consistent object handling
1 parent fef3207 commit ab81f0d

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

pydoll/element.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,9 @@ async def inner_html(self) -> str:
134134
Returns:
135135
str: The inner HTML of the element.
136136
"""
137-
if self._search_method == By.XPATH:
138-
command = DomCommands.get_outer_html(
139-
object_id=self._node['objectId']
140-
)
141-
else:
142-
command = DomCommands.get_outer_html(self._node['nodeId'])
137+
command = DomCommands.get_outer_html(
138+
object_id=self._node['objectId']
139+
)
143140
response = await self._execute_command(command)
144141
return response['result']['outerHTML']
145142

0 commit comments

Comments
 (0)