browser-automation

Passing multiple files to input node with Watir (using Ruby)

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-02 06:40:58
So I have hit a bit of a snag. I am trying to automate a test case where I need to pass multiple files to an input node and I cannot figure out how to do so. I can use either Mechanize or Watir, but have found very little information on a topic that seems relatively major in automation. In the snippets below, I'm using Watir with Ruby. The main issue I'm having is that it seems when multiple files are selected, the input node is no longer visible. The input node does accept multiple files, and passing in a single path does result in a successful upload, like so. path1 = "/path/to/file.json"

Is it possible to set the value of Style property of an element by nightwatch.js ? if yes then how?

一世执手 提交于 2019-12-02 01:59:38
问题 I am working with nightwatch.js and i am quite new into this automation testing, i want to set the value into the style property of an element by nightwatch.js, so i am asking, is it possible ? if it is possible then how can we implement it. I can access the style property values and can check by following nightwatch api command but i couldn't find any way to set the style's value to an element using nightwatch.js browser.expect.element('#main').to.have.css('display').which.equals('block');

Nightmare JS not working

て烟熏妆下的殇ゞ 提交于 2019-12-01 18:01:44
I know the title of the question looks very vague! But that's there's to it. I installed nodejs on my production server, which had phantomjs working properly, then I installed nightmare via npm install nightmare , I can see it in node_modules, I tried the example listed by the developers on github: var Nightmare = require('nightmare'); var nightmare = Nightmare({ show: true }) nightmare .goto('http://yahoo.com') .type('input[title="Search"]', 'github nightmare') .click('#uh-search-button') .wait('#main') .evaluate(function () { return document.querySelector('#main .searchCenterMiddle li a')

VBA IE automation - wait for the download to complete

流过昼夜 提交于 2019-12-01 13:30:02
I am trying to automate some tasks which are being done through Internet explorer, which include downloading a file and then copying it to a different directory and renaming it. I was more or less successful in finding the information on how to do this, the code is working, but it has exceptions, therefore I would be grateful if someone could help me to improve this code. There are two things I would like to do: Insert a loop, so that the script would wait for certain elements to appear and only then would proceed with execution. I have found something on this page, however, I also would like

Maintain and re-use existing webdriver browser instance - java

与世无争的帅哥 提交于 2019-12-01 13:08:18
Basically every time I run my java code from eclipse, webdriver launches a new ie browser and executes my tests successfully for the most part. However, I have a lot of tests to run, and it's a pain that webdriver starts up a new browser session every time. I need a way to re-use a previously opened browser; so webdriver would open ie the first time, then the second time, i run my eclipse program, I want it to simply pick up the previous browser instance and continue to run my tests on that same instance. That way, I am NOT starting up a new browser session every time I run my program. Say you

VBA IE automation - wait for the download to complete

南楼画角 提交于 2019-12-01 11:48:51
问题 I am trying to automate some tasks which are being done through Internet explorer, which include downloading a file and then copying it to a different directory and renaming it. I was more or less successful in finding the information on how to do this, the code is working, but it has exceptions, therefore I would be grateful if someone could help me to improve this code. There are two things I would like to do: Insert a loop, so that the script would wait for certain elements to appear and

Dump HTML of page including iframes

跟風遠走 提交于 2019-12-01 07:01:19
问题 I'd like to dump the HTML contents of a web page, including the HTML of iframes included inside the <iframe> elements. The Chrome Developer Tools "Elements" tab is capable of showing iframe embedded in this way. When I say "dump the HTML contents" I'm interested in browser automation tools like Selenium or PhantomJS. Do any of these tools have this capacity built in? For example, the HTML dump I'd like of this page should include the HTML source of this embedded page. 回答1: You can use

Form.Submit does not go through when using VBA

泪湿孤枕 提交于 2019-12-01 05:44:44
I have a webpage that I am extracting data from. I can do everything fine with VBA apart from clicking on an image element which then submits a form and a popup with data is created. One of the attributes in the image element is called "productguid" and has a string value = "a12-545". The HTML code of the form looks like this BEFORE I click on the image element with my mouse. <form id="GetProductQuantitiesForAccessibleBranches" action="GetProductQuantitiesForAccessibleBranches" method="post"> <input type="hidden" name="ProductGuid" value=""> </form> This is the HTML code AFTER I manually click

Form.Submit does not go through when using VBA

北战南征 提交于 2019-12-01 03:39:14
问题 I have a webpage that I am extracting data from. I can do everything fine with VBA apart from clicking on an image element which then submits a form and a popup with data is created. One of the attributes in the image element is called "productguid" and has a string value = "a12-545". The HTML code of the form looks like this BEFORE I click on the image element with my mouse. <form id="GetProductQuantitiesForAccessibleBranches" action="GetProductQuantitiesForAccessibleBranches" method="post">

VBA Internet automation code not working when ie.Visible = False

对着背影说爱祢 提交于 2019-11-30 23:59:13
Good morning, I am struggling to find information on a problem which seems to not have much information available on the internet - that is the "frame notification bar" in internet explorer ( the little yellow window that asks you if you want to "save" or "open" a file downloaded). I will cut to the chase, the issue I am having is that my code works when an internet explorer visibility is set to true, but doesn't work when visibility is set to false. I have stepped through the code in both situations to see what changes, and noticed the handle for the frame notification bar changes value but