0

I'm running into an issue with my Selenium script on Python.

Here is the code I am currently working with. The test opens the page and did nothing: there is no hover and click. I'm new with Python and with programming in general, I can't figure out how to sequence this correctly.

Any help would be greatly appreciated. Thanks in advance.

Python 3.9.0 selenium==3.141.0 seleniumbase==1.50.14

from selenium.webdriver.common.by import By from seleniumbase import BaseCase

class NavigationTest(BaseCase):

def setup_class(self):
    self.base_url = "https://www.babyshop.com/"

def test_basket(self):
    # go to the goods page
    self.get(self.base_url + 'edushape/s/2003')
    # hover and click on the 1st position
    self.hover_and_click('//article[1]', '//article[1]//div[@class="quickshop-btn__holder"]',
                         By.XPATH, By.XPATH)
    self.sleep(3)

0 Answers0