browser-automation

Open QTP (UFT) Using Java Script using Chrome

久未见 提交于 2019-12-24 10:28:51
问题 The following is the code I used to launch qtp, It is working well with IE but not in chrome. What are the changes I shd Make to open through Chrome var qtApp = new ActiveXObject("QuickTest.Application"); qtApp.Launch(); // Start QuickTest qtApp.Visible = true; 回答1: Microsoft's VBScript is integrated with COM and UFT also exposes a COM interface, this is why you were able to launch UFT from HTML using VBScript. However VBScript is not supported by Chrome and JavaScript is not integrated with

Automate “Save as HAR with Content”

心不动则不痛 提交于 2019-12-24 02:17:31
问题 I am familiar with how to use the Google Chrome Web Inspector to manually save a webpage as a HAR file with the content. I would like to automate this. In my searches for tools to automate the generation of a HAR file, I have found some solutions, but none of them save the content of the resources. I have tried the following without any luck: https://github.com/ariya/phantomjs/blob/master/examples/netsniff.js https://github.com/cyrus-and/chrome-har-capturer Getting the content of the page you

Python Webdriver - Firefox profiles - Error code: SEC_ERROR_UNKNOWN_ISSUER -

元气小坏坏 提交于 2019-12-23 15:48:14
问题 Read through all over the internet but still can't resolve the following error while trying to run test script on my test environment "The certificate is not trusted because the issuer certificate is unknown. The server might not be sending the appropriate intermediate certificates. An additional root certificate may need to be imported." All software versions are as follows: Firefox - 60.0.2 Python - 3.6 Selenium - 3.12.0 Gecko driver - 20.1 Tried the following and failed: 1- Created custom

In Puppeteer how to switch to chrome window from default profile to desired profile

让人想犯罪 __ 提交于 2019-12-23 12:27:54
问题 My requirement is to test chrome extensions on a new profile. I referred https://peter.sh/experiments/chromium-command-line-switches/ for Chromium args[--user-data-dir, --profile-directory] After the browser is launched, 2 chrome windows are opened. One with given profile and extension and another with default profile and given extension. Also the focus is on a window with default profile. So all actions are happening on it. I had expected that only 1 browser window would be opened with

IE Web Automation - How to auto select value from combo box using Excel VBA/XML Macro

ⅰ亾dé卋堺 提交于 2019-12-23 04:22:49
问题 I'm a beginner in VBA and I've failed to select country name automatically in web Combo box or list box from my Excel spreadsheet. My code is entering country name only, but not selecting it. How can I change this code so it can pick country name from my Excel spreadsheet and select the same in web combo box as a loop. Passport number, DOB and Nationality are correct on my code. If you'll use manually then you can find the work permit number which I need to capture in my spreadsheet. Chrome

Filling HTML Input Boxes That Were Created With Select2

大城市里の小女人 提交于 2019-12-23 03:23:10
问题 I'm using Excel VBA to automate a web page. The "Select" boxes and "Input" boxes were created by a jQuery platform called "Select2." When the user clicks on a "Select box" (which appears as an input box) a dropdown box pops up asking the user to type in two characters. I've discovered that you can add a valid data item into this box with this command by inserting the select box ID. myDoc.parentWindow.execScript "$('#s2id_broomCloset').val('Swiffer - Model 2010').trigger('change')" Most of the

What is the mechinism used for commiunication between webdriver and browser

余生颓废 提交于 2019-12-22 09:47:55
问题 Anyone can explain how communication happen between browser and web-driver?. How does webdriver object read and identify html elements in browser ?. For that what is the relationship between webdriver object and browser and how to build the relationship browser and webdriver object? driver = new FirefoxDriver(); driver.findElements(By.id("element")); 回答1: The communication between webdriver and browser happens through a json-wire protocol which is specified in the W3C documentation. All

How to write my own customize locator for Selenium webdriver in java?

家住魔仙堡 提交于 2019-12-22 09:39:24
问题 I want to write my own locator to access the elements. WebDriver’s API offers currently eight locators allowing to retrieve elements by id, name attribute, tag name, complete or partial link text, XPath, class name, and css selector. However those default locators not enough for me now because I have to access the elements through a new attribute. Let me give an xample so that you can understand what I really want here. Example: Choose your username: Now I want to write a code so that I can

Excel VBA SendKeys not causing IE 9 to save download

那年仲夏 提交于 2019-12-22 06:00:42
问题 I am writing a macro to download a csv file from my company's internal website. For many reasons I can't use any xmlhttp objects. The macro will download the file. The problem is Internet Explorer 9 prompts the user with Open, Save, and Cancel buttons. While in IE, Alt+Shift+S will save the download, but I can't get the Sendkeys "%+s" method from Excel VBA to work. Here is the relevant code: Function followLinkByText(thetext As String) As Boolean 'clicks the first link that has the specified

How to use synchronize in Capybara exactly?

守給你的承諾、 提交于 2019-12-22 04:10:33
问题 If how to use wait_until is pretty clear (I've used the methods like this while creating tests through the native Webdriver methods), but not the new synchronize method (sorry:)). I've read the theme about why wait_until is deprecated, I've read the article about that, I've read the docs with method description and also read the code where the description present too. But I didn't find any example or tutorial how exactly to use this method. Anybody, please, provide few cases where I (and