Skip to content

Is there a way for recorder mode to capture and replay clicks under a dropdown menu #1902

Answered by mdmintz
rrajpuro asked this question in Q&A
Discussion options

You must be logged in to vote

For special cases, eg. on https://seleniumbase.io/demo_page, the Recorder will be able to detect hovering and clicking elements, as it did generate this script:

from seleniumbase import BaseCase
BaseCase.main(__name__, __file__)

class RecorderTest(BaseCase):
    def test_recording(self):
        self.open("https://seleniumbase.io/demo_page")
        self.hover_and_click("div#myDropdown", "a#dropOption1")
        self.hover_and_click("div#myDropdown", "a#dropOption2")
        self.hover_and_click("div#myDropdown", "a#dropOption3")

However, for many situations, it won't differentiate between hovering and normal browsing, unless it can detect a hover_click action like above, but even that r…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mdmintz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants