0

I am trying to select the last option and, I am stuck at this stage. is there any way to directly select a 2000 option by XPath.

Thanks to everyone, I edited my question and, I have come up with an Xpath solution.

Here is the code:

    obj = Select(driver.find_element_by_xpath("//div[@id='pagerA']//div//font//select"))
obj.select_by_value("2000")

enter image description here

9
  • 1
    First two lines are Python, the third is a mix between C# and Java/Python. You should also explain what is the problem, anyone could help me out is not a question. Commented Jan 20, 2020 at 7:41
  • You're using python and there's no FindElement method, you mixed up with C#. Use driver.find_element(By.XPATH, ""). Commented Jan 20, 2020 at 7:51
  • driver.FindElement(By.XPath()) is C#, you want driver.find_element_by_xpath() Commented Jan 20, 2020 at 7:53
  • Sorry about that, I have edited my question. I found this "following::span[1]" somewhere here while I was looking for a proper way to do so. Commented Jan 20, 2020 at 7:54
  • 1
    Can you share the URL? What error do you get? Update the question with latest code you tried. Commented Jan 20, 2020 at 11:51

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.