Questions tagged [linktext]

Link Text: A locator strategy to find a web element with the Link Text.

Link Text: A locator strategy to find a web element with the Link Text.

The elements returned are the result of calling querySelectorAll, with argument a elements, with the context object equal to the start node. If this throws an exception, return error with error code unknown error.

Source: Link Text

31 questions
3
votes
1 answer

sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) using findElement(By.className()) through Selenium and Java

When I execute the following code: driver.findElement(By.className("qview-product-name")).click(); I get the following error Session ID: d5df6f837164b1738991e8dc09027fe0 *** Element info: {Using=class name, value=qview-product-name} at…
Aaron
  • 53
  • 1
  • 1
  • 5
2
votes
2 answers

Selenium unable to locate button

I am trying to click a button on a website in Python using Selenium. The html looks like this: Create report I have tried using: l = driver.find_element(By.XPATH,…
Bob
  • 127
  • 2
  • 7
2
votes
1 answer

Selenium and LINK_TEXT

I tried to scrapp a cost with a LINK TEXT but my scrapping method can't find the TEXT: budget = budgets.append((driver.find_element(By.LINK_TEXT, 'Total budget/expenditure:')).text) The web site is :…
rocheteau
  • 68
  • 6
2
votes
2 answers

Selenium FindElements method Java

In my project I use findElement(By.linkText("")).click(); but in the web page I'm using, many links have the same name(btw I can use By.linktext only) so i want to know it its possible to navigate among the links which have the same name Also when i…
SCS
  • 23
  • 6
2
votes
1 answer

How to click on a button by the link text using Selenium and Python

I know, there are plenty of tutorials out there for this task. But it seems like I'm doing something wrong, I need help by telling me how to press it, doesn't need to be by text. from selenium import webdriver from selenium.webdriver.common.keys…
1
vote
2 answers

Unable to locate elements on a website , i tried all the locators but I get the error "No such element" . I am a self taught beginner to Automation

Element HTML: Inbox What I tried: driver.findElement(By.cssSelector("a[text='Log out']")); then driver.findElement(By.xpath("//a[.='Log out']")); Element snapshot: HTML
Myzizo
  • 19
  • 3
1
vote
1 answer

Unable to select the link with link_text in selenium with python

I am new to automation and trying to automate a website with links in it. When I tried hardcoding the user name and password and then selecting the link using Link_text, the code worked, But When I tried fetching data from Excel file for user name…
DV123
  • 11
  • 3
1
vote
2 answers

Python Selenium Locating Element and Clicking on it

I have been stuck in this line of code for over 2 weeks now, and I am hoping someone might come to my assistance! I am using python selenium to navigate through a website which contains a database. I want to click on a link which will open a new…
1
vote
2 answers

How to click link question using Selenium Python

Hi I am new to Selenium Python Webdriver. Trying to click the link Abc by using find_element_by_link_text which didn't work ,
Mush
  • 75
  • 2
  • 9
1
vote
1 answer

TypeError: Invalid locator error using By.linkText containing dot characters (Selenium)

I've looked around on other SO questions, but I don't see anything that could help me. My error, as the title suggests, is the TypeError: Invalid locator error. Here is part of my code (where I think the problem occurs), so that you can see what is…
1
vote
2 answers

excel vba - Selenium Find Element

I'm using Selenium to do some webscraping. I always struggle with finding elements when Name or ID isn't an options. The page is https://www.portfolio123.com/holdings.jsp?portid=1637063 And I'm trying to find the log in button. the element looks…
1
vote
1 answer

How to Get the href attribute of the element using Selenium and Python

Hello I want to get the Href link inside this HTML code but I couldn't I tried with the XPath but it just returns an error The…
1
vote
1 answer

Amazon Ubuntu EC2 Python Selenium Webbrowser Chrome Element suddenly not interactable anymore

I successfully created a python script that downloads stock data from the charting platform tradingview. When i start it from my local machine everything works fine. Now i wanted to start the script from an ubuntu ec2 machine and a crontab. I first…
Russgo
  • 104
  • 6
1
vote
1 answer

How to click a button in an automated test using Selenium and Java

I'm trying to automate a test using Selenium and I want to click a button using xpath. This is what I'm doing: WebElement LogInButton = driver.findElement(By.xpath("/login")); LogInButton.click(); But I get an error that says: Exception in thread…
iag20
  • 73
  • 1
  • 4
1
vote
1 answer

Selenium finds the element (anchor) but still says element not visible?

I have a "clear all" button which is an anchor. The HTML structure is like this:
one-hand-octopus
  • 2,229
  • 1
  • 17
  • 51
1
2 3