Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title> XYZ </title>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
- <meta http-equiv="Content-Style-Type" content="text/css" />
- <meta http-equiv="content-language" content="en" />
- <script type="text/javascript">
- if (navigator && navigator.appVersion && navigator.appVersion.match("Safari") && !navigator.appVersion.match("Chrome")) {
- // hack to force a window redraw
- window.onload = function() {
- document.getElementsByTagName('html')[0].style.backgroundColor = '#000000';
- }
- }
- </script>
- </head>
- <frameset id="wc-frameset" rows="82,*" frameborder="no" border="0" framespacing="0">
- <frame frameborder="0" src="/frontend/header/" name="top" marginwidth="0" marginheight="0" scrolling="no" noresize="noresize" />
- <frameset cols="*,156,850,*" frameborder="NO" border="0" framespacing="0">
- <frame frameborder="0" src="/frontend/fillbar/" name="fillbar" marginwidth="0" marginheight="0" scrolling="no" noresize="noresize" />
- <frame frameborder="0" src="/frontend/navigation/" name="navigation" marginwidth="0" marginheight="0" scrolling="no" noresize="noresize" />
- <frame frameborder="0" src="/frontend/frames/" name="content_area" marginwidth="0" marginheight="0" scrolling="no" noresize>
- <frame frameborder="0" src="/frontend/fillbar/" name="fillbar" marginwidth="0" marginheight="0" scrolling="no" noresize="noresize" />
- </frameset>
- </frameset>
- </html>
- username = driver.find_element_by_id("username")
- password = driver.find_element_by_id("password")
- username.send_keys("****")
- password.send_keys("****")
- driver.find_element_by_class_name("bg-left").click()
- #this bit works
- driver.switch_to_frame("content_area")
- #this seems to work too, got the frame name from the page source
- search = driver.find_element_by_id("field-name")
- search.send_keys("TEST")
- #this fails, no element found
- <div id="field-name" class="field field-StringField">
- <label for="name">Name</label> <div class="input-con"><input id="name" name="name" type="text" value=""></div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement