The following is an example seleniumbase python script. The second print(html) is not correct because the screen changed, and it is still printing the same initial html. The url remains the same on the browser navigation bar for both cases before and after the button is clicked.
How do I retrieve the final html after the button is clicked?
self.open("https://www.example.com/dashboard")
url = self.get_current_url()
print(url) # Prints https://www.example.com/dashboard, which is correct
html = self.get_page_source()
print(html) # Prints the initial html of https://www.example.com/dashboard, which is correct
self.click("//span[contains(.,'Change Screen Button')]")
url = self.get_current_url()
print(url) # Prints https://www.example.com/dashboard, which is correct since the url remains the same on the browser navigation bar, even though the screen changed
html = self.get_page_source()
print(html) # Prints the initial html of https://www.example.com/dashboard, which is incorrect