Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Selenium
#1
Hi everyone,

I need your help for a strange problem.
I am using Selenium library and I have problem with this instruction:
driver.find_element_by_name('longitude')
Sometimes it works and I can find the element with the name 'longitude' and sometimes not even if nothing changes in the web page.

Thank you,
Reply
#2
Some time most give page more time to load all,before search for content on page.
time.sleep(3) is an easy way that can be used as test.
Let the page load 3-sec before do any thing.

Waits can be the more correct way.
Quote:wait makes WebDriver wait for a certain condition to occur before proceeding
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Error in Selenium: CRITICAL:root:Selenium module is not installed...Exiting program. AcszE 1 3,627 Nov-03-2017, 08:41 PM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020