TypeError: 'str' object is not callable

0 votes

Hi ,

I am working selenium 4.0 , relative locators . Please let me know why the below code is throwing error
and not identifying the objects.

driver =  webdriver.Chrome(executable_path="C://Python Pro//untitled//CromeDriver//chromedriver.exe")

driver.get("https://www.swtestacademy.com/")
driver.find_element(with_tag_name("article").to_right_of(By.XPATH("//article[1]")))

Error: TypeError: 'str' object is not callable

May 26 in Selenium by priya
• 120 points
236 views
It looks like an issue with your XPath. Have you correctly specified it?
You r not doing anything with the statement. Store it as webelement or do action like click sendkeys etc

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Selenium

0 votes
1 answer
0 votes
1 answer

Selenium Alternatives: Is there a tool like Selenium for testing web pages but which does not involve coding.

I'm guessing you've tried Selenium IDE already. ...READ MORE

answered Apr 13, 2018 in Selenium by king_kenny
• 3,710 points
141 views
+1 vote
2 answers

Getting this error: “Element is not clickable at point”

There are 3 possible solutions for this: 1. ...READ MORE

answered Apr 20, 2018 in Selenium by king_kenny
• 3,710 points
49,946 views
+1 vote
2 answers
0 votes
1 answer

Selenium Exception: Element is not visible

Finding the element before locating the one ...READ MORE

answered May 7, 2018 in Selenium by king_kenny
• 3,710 points
4,906 views
0 votes
1 answer

To check that the web page is loaded or not using Selenium Web Driver?

The solution is using Implicit Wait which ...READ MORE

answered May 24, 2018 in Selenium by Meci Matt
• 9,460 points
12,225 views
0 votes
1 answer

Selenium ChromeBrowser get() method is not working

Make sure you are passing a valid ...READ MORE

answered May 25, 2018 in Selenium by Samarpit
• 5,890 points
876 views
0 votes
1 answer

Check that the element is clickable or not in Selenium WebDriver

Use Selenium Waits: WebDriverWait ...READ MORE

answered Jun 12, 2018 in Selenium by Meci Matt
• 9,460 points
17,815 views
0 votes
1 answer

What is Page Object Model in Selenium WebDriver?

If you want to learn about Selenium ...READ MORE

answered Jun 14, 2018 in Selenium by Meci Matt
• 9,460 points
359 views