selenium

Open multiple tabs in selenium using python

无人久伴 提交于 2021-02-10 20:21:41
问题 I have generated a list of links using selenium,i need to open each link in a separate tab.I have tried body.send_keys(Keys.CONTROL +"t") and body.send_keys(Keys.COMMAND+"t") but both didn't work(no errors but nothing happens), after searching for answers i found this link Opening new tabs selenium,however they mostly used java script(which works it opens a new tab) to run it which i can not seem to manipulate such as driver.execute_script('''window.open("http://bings.com","_blank");''')

Where to check which JXBrowser & Selenium matched version?

六眼飞鱼酱① 提交于 2021-02-10 20:20:34
问题 I read along the Release Notes of each JXBrowser's Versions at the moment. But still not found any official page stating the matched (working) version that works to the Selenium library except only ONE . CMIIW, but the page (link) only said: This approach was tested with Selenium WebDriver 2.46 and ChromeDriver 2.16. And what about the JXBrowser version itself... which JXBrowser version is matched to Selenium , etc.... What about JXBrowser 6.22 is it fine with Selenium 2.46 or something?

Open multiple tabs in selenium using python

こ雲淡風輕ζ 提交于 2021-02-10 20:20:08
问题 I have generated a list of links using selenium,i need to open each link in a separate tab.I have tried body.send_keys(Keys.CONTROL +"t") and body.send_keys(Keys.COMMAND+"t") but both didn't work(no errors but nothing happens), after searching for answers i found this link Opening new tabs selenium,however they mostly used java script(which works it opens a new tab) to run it which i can not seem to manipulate such as driver.execute_script('''window.open("http://bings.com","_blank");''')

How to use both the Firefox Profile and Firefox options with Selenium in Java

被刻印的时光 ゝ 提交于 2021-02-10 19:59:44
问题 I'm writing a test that I'd like to headless, which will also download a file within java using Selenium. from here I learn that you can set a driver to be headless by throwing this code before you initialize the driver: options.setHeadless(true); //sets driver to work headless WebDriver driver = new FirefoxDriver(options); and that I can use this method to write a Firefox Profile which will dictate a download directory and allow me to download a file with firefox w/o any pop up windows (I've

How to retrieve the list of values from a drop down list

半腔热情 提交于 2021-02-10 19:55:32
问题 I am trying to retrieve the list of available option expiries for a given ticker on yahoo finance. For instance using SPY as ticker on https://finance.yahoo.com/quote/SPY/options The list of expiries are in the drop down list: <div class="Fl(start) Pend(18px) option-contract-control drop-down-selector" data-reactid="4"> <select class="Fz(s)" data-reactid="5"> <option selected="" value="1576627200" data-reactid="6">December 18, 2019</option> <option value="1576800000" data-reactid="7">December

How to retrieve the list of values from a drop down list

拜拜、爱过 提交于 2021-02-10 19:54:41
问题 I am trying to retrieve the list of available option expiries for a given ticker on yahoo finance. For instance using SPY as ticker on https://finance.yahoo.com/quote/SPY/options The list of expiries are in the drop down list: <div class="Fl(start) Pend(18px) option-contract-control drop-down-selector" data-reactid="4"> <select class="Fz(s)" data-reactid="5"> <option selected="" value="1576627200" data-reactid="6">December 18, 2019</option> <option value="1576800000" data-reactid="7">December

Selenium printing same information repeatedly

我的未来我决定 提交于 2021-02-10 18:25:03
问题 Hello I am trying to scrape some data from a website that has data in its 'dl' tag here is how the website structure looks <div class="ecord-overview col-md-5"> <h2><span itemprop="name">Donald Duck</span></h2> dl class="row"> </dd> <dt class="col-md-4">Email</dt> <dd class="col-md-8">myemail.com</dd> </dl> <div class="ecord-overview col-md-5"> <h2><span itemprop="name">Mickey mouse</span></h2> dl class="row"> </dd> <dt class="col-md-4">Email</dt> <dd class="col-md-8">youremail.com</dd> </dl>

Selenium - Selecting an item from dropdown list if the values are inside <table> tags and NOT under <option> in html

a 夏天 提交于 2021-02-10 18:17:08
问题 The below is a snippet from our html code which appears as a drop down list in the application. I am unable to select a particular value from the drop down list using Select class in Selenium - possibly because it doesn't have "Option" tags?. Is there any way to select the item? -UPDATE: This has a parent tag which talks about visibility. Basically to tell that elements are visible only if the user clicks the drop down arrow. "< input type="hidden" *****" For e.g. I need to select 'I am

Travis uses Firefox 56 although Firefox 59 is installed on same system

余生颓废 提交于 2021-02-10 18:10:31
问题 When running Selenium on Travis, it uses Firefox version 56. I need to use the latest version of Firefox, 59. Running apt-get update and upgrade does not solve this problem, but instead leaves the system with two different versions of Firefox, both 56 and 59. $ which firefox /usr/local/bin/firefox $ firefox --version Mozilla Firefox 56.0.2 but $ /usr/bin/firefox --version Mozilla Firefox 59.0.2 Anyone knows how to resolve this so that Firefox 59 is the only version available on the system?

How to get the price as a number from a website using Selenium and Python

眉间皱痕 提交于 2021-02-10 18:02:51
问题 I am creating a bot that would automate my work and copy particular values from a particular website. Everything works fine but the last lines of my code that says w.text produces an outcome which is text and I need a number. Each element that I need the value of looks like this after inspection: <span class="good">€25,217.65</span> How do I get the value as a number instead of as a text? I tried w.value or w.get_attribute('value) but it doesn't work. Here is my program (excluding downloads