-3

enter image description here

I am unable to click on the LinkedIn sign-in button. Can someone please guide me with what locator should I use? What should be the actual code.

I have tried

driver.find_element(By.CLASS_NAME,"btn__primary--large from__button--floating").click() 

but that doesn't work

2

1 Answer 1

1

CLASS_NAME accepts single class attribute while here there are 2: btn__primary--large and from__button--floating.
To locate element based on 2 class values you can use CSS Selector or XPath, as following:

driver.find_element(By.CSS_SELECTOR,".btn__primary--large.from__button--floating").click() 

Or

driver.find_element(By.XPATH,"//*[@class='btn__primary--large from__button--floating']").click() 
0

    Start asking to get answers

    Find the answer to your question by asking.

    Ask question

    Explore related questions

    See similar questions with these tags.