selenium-chromedriver

How can I count and select some rows in a Web table using Selenium?

假装没事ソ 提交于 2020-04-30 09:08:26
问题 I'm developing an Automation test using Selenium WebDriver and Java, I need to assured that there are items in the web table, and select one of those items, but the ID is dynamic. HTML code: <table class="datagrid-btable" cellspacing="0" cellpadding="0" border="0" style="table-layout: auto;"> <tbody> <tr id="datagrid-row-r4-2-0" datagrid-row-index="0" class="datagrid-row datagrid-row-selected"> <td field="PLANT_CODE" style="display:none;"> <div style="text-align: left;" class="datagrid-cell

How do I switch focus to a new window using Selenium VBA?

跟風遠走 提交于 2020-04-30 07:01:06
问题 So, I know how to find the name of the active window currentWindow = bot.Send("GET", "/window_handle") bot.SwitchToWindowByName currentWindow Is there a way to get the name of the inactive window that I just popped up? I tried going to console and typing window.name and got "" Also tried using window.document.name and got "download.phtml", but bot.SwitchToWindowByName download.phtml gave me a Runtime 424 Object Required error. Picture of the new window (on the right) 回答1: Explicitly with bot

How to make automated test scripts in protractor wait, until the page is loaded fully

自闭症网瘾萝莉.ら 提交于 2020-04-29 09:55:23
问题 No, but really! I know this generic question has been asked thousands of times, but there is something more specific that looks feasible to me and thus I want to know how to achieve it The problem I'm testing an angular app with protractor. Inside the app I want to verify that when I click a link I'm being redirected to the right page (non-angular). The problem is that until I reach the page I'm verifying, the url changes 3 times or so (there are multiple redirections happening), so I can't

How to make automated test scripts in protractor wait, until the page is loaded fully

安稳与你 提交于 2020-04-29 09:55:11
问题 No, but really! I know this generic question has been asked thousands of times, but there is something more specific that looks feasible to me and thus I want to know how to achieve it The problem I'm testing an angular app with protractor. Inside the app I want to verify that when I click a link I'm being redirected to the right page (non-angular). The problem is that until I reach the page I'm verifying, the url changes 3 times or so (there are multiple redirections happening), so I can't

Clicking on Get Data button for Monthly Settlement Statistics on nseindia.com doesn't fetch results using Selenium and Python

血红的双手。 提交于 2020-04-24 05:51:32
问题 I am trying to scrape data from here. By clicking on the capital market and 2019-20 year. I want to click on Get data. I have used following code: driver = webdriver.Chrome(executable_path=chrome_path,options=chrome_options) driver.get( nse_cash_keystats_page ) driver.find_element_by_xpath( "//select[@id='h_filetype']/option[text()='Capital Market ']" ).click() driver.find_element_by_xpath( "//select[@id='yearField']/option[text()='2019-2020']" ).click() downloadButton=WebDriverWait(driver,20

Clicking on Get Data button for Monthly Settlement Statistics on nseindia.com doesn't fetch results using Selenium and Python

感情迁移 提交于 2020-04-24 05:49:27
问题 I am trying to scrape data from here. By clicking on the capital market and 2019-20 year. I want to click on Get data. I have used following code: driver = webdriver.Chrome(executable_path=chrome_path,options=chrome_options) driver.get( nse_cash_keystats_page ) driver.find_element_by_xpath( "//select[@id='h_filetype']/option[text()='Capital Market ']" ).click() driver.find_element_by_xpath( "//select[@id='yearField']/option[text()='2019-2020']" ).click() downloadButton=WebDriverWait(driver,20

How to Scroll web page to the target element using selenium

旧时模样 提交于 2020-04-18 05:47:54
问题 I want to scroll to an element in selenium, but I want it to be at the top of the page, not just visible on the page. How can I make it so that the page scrolls such that the element being scrolled to is at the top of the browser? target = browser.find_element_by_css_selector(".answers-wrap") actions = ActionChains(browser) actions.move_to_element(target) actions.perform() 回答1: Here is example using this page we are on To scroll the web page by 1000 pixel vertical use execute_script("window

How to Login to WebEx Platform with Selenium

时光毁灭记忆、已成空白 提交于 2020-04-18 05:45:43
问题 I can't login to the WebEx Platform, and I need to be able to login to WebEx to scrape the meetings scheduled for the week. I keep getting tracebacks, but I can't even send.keys() methods to the perspective login form on the login container. The main thing is I am having an issue with just autneticating. I need to be able to login to be able to parse and see the current weeks schedule. You can see the code here: https://github.com/Richard-Barrett/ITAdminInfra/blob/master/Integrations/WebEx

CNN Scraper sporadically working in python

无人久伴 提交于 2020-04-16 05:47:21
问题 I've tried to create a Web Scraper for CNN. My goal is to scrap all news articles within the search query. Sometimes I get an output for some of the scraped pages and sometimes it doesn't work at all. I am using selenium and BeautifulSoup packages in Jupiter Notebook. I am iterating over the pages via the url parameters &page={}&from={} . I tried by.XPATH before and simply clicking the next button at the end of the page, but it gave me the same results. Here's the code I'm using: #0 ---------

Trying to take and save a screenshot of a specific element (selenium, python, chromedriver)

十年热恋 提交于 2020-04-16 02:51:06
问题 I am trying to take and save a screenshot of the image+comment block that can be seen by navigating to https://www.instagram.com/p/B9MjyquAfkE/. Below is a testable piece of my code. I am getting an error: article.screenshot_as_png('article.png') TypeError: 'bytes' object is not callable It seems that the code is able to find article, but is having an issue with the screenshot. I am also trying to specify a certain location where I want to save my screenshot on my computer. from selenium