I'm trying to program a bot to scrape and apply for jobs on indeed.com. My question is, how can i locate the id of an iframe so i can run commands within it.
unless page.has_css?('p.expired')
click_link('Apply Now')
page.driver.within_frame(1) do
page.driver.within_frame(0) do
complete_step_one
complete_additional_steps
end
The frame that pops up is when you click on Apply Now, it asks for name, number, email, cover letter.
Any help is appreciated.
within_frametakes the frame element, the name or id of the frame, the index of the frame on the page, or in the latest version of Capybara you can pass nothing if there's only one frame on the page.From the link you pasted it appears the main document conatins one iframe that also contains one iframe, so that could be
or in the latest version of Capybara
Another way to do it would be something like