के साथ दो फ्रेम के बीच कैसे स्विच कर सकता हूं मैं 2 फ्रेम के अंदर कुछ करने की कोशिश कर रहा हूं लेकिन जब भी मैं फ्रेम के बीच स्विच करने का प्रयास करता हूं तो त्रुटि हर बार बढ़ जाती है। उदाहरण के लिए:मैं कैपिबरा
# encoding: utf-8
require "capybara/dsl"
Capybara.run_server = false
Capybara.current_driver = :selenium
Capybara.app_host = 'https://hb.posted.co.rs/posted'
class Account
include Capybara::DSL
def check_balance
visit('/')
page.driver.browser.switch_to.frame 'main'
fill_in 'korisnik', :with => 'foo'
fill_in 'lozinka', :with => 'bar'
click_button 'Potvrda unosa'
page.driver.browser.switch_to.frame 'header'
click_on 'Stanje'
end
end
account = Account.new
account.check_balance
त्रुटि है:
[remote server] file:///tmp/webdriver-profile20120810-9163-xy6dtm/extensions/[email protected]/components/driver_component.js:6638:in `unknown': Unable to locate frame: main (Selenium::WebDriver::Error::NoSuchFrameError)
क्या समस्या है? शायद मैं यहाँ कुछ गलत कर रहा हूँ?
अगर मैं फ्रेम स्विचिंग का क्रम बदल तो फिर 'मुख्य' फ्रेम करने के लिए स्विच 'शीर्षक के लिए स्विच करने के लिए पहली कोशिश तो सिवाय यह कहना है कि इस समय है कि वहाँ कोई' मुख्य 'फ्रेम वही त्रुटि को जन्म देती है:
# encoding: utf-8
require "capybara/dsl"
Capybara.run_server = false
Capybara.current_driver = :selenium
Capybara.app_host = 'https://hb.posted.co.rs/posted'
class Account
include Capybara::DSL
def check_balance
visit('/')
page.driver.browser.switch_to.frame 'header'
click_on 'Stanje'
page.driver.browser.switch_to.frame 'main'
fill_in 'korisnik', :with => 'foo'
fill_in 'lozinka', :with => 'bar'
click_button 'Potvrda unosa'
end
end
account = Account.new
account.check_balance
त्रुटि:
[remote server] file:///tmp/webdriver-profile20120810-9247-w3o5hj/extensions/[email protected]/components/driver_component.js:6638:in `unknown': Unable to locate frame: main (Selenium::WebDriver::Error::NoSuchFrameError)
महान .. मुझे बहुत मदद मिली! – karthikeayan