browser-automation

How do I automate a web proxy in .NET for unit tests (including set up and tear down)?

女生的网名这么多〃 提交于 2019-12-11 07:09:39
问题 Following Jonathan Holland's suggestion in his comment for my previous question: Is there any way in .NET to programmatically listen to HTTP traffic? I've made a separate (but not exactly a duplicate) question for what I really want to know: How do I automate a web proxy in .NET for unit tests (including set up and tear down) for spying on HTTP traffic that comes from the browser (particularly images, scripts, and XmlHttpRequests on the requested page)? I prefer to have zero set-up (so no

Cypress.io + TypeScript. Assertion call in beginning of test

非 Y 不嫁゛ 提交于 2019-12-11 01:00:00
问题 I am new to Cypress.io and TypeScript. So I do not understood some stuff here. My code: //Test describe('TEST description', function () { it('newJobCreation', function () { //Some code 1 var numberBefore = cy.get('#idOfItem') var _numberBefore = +numberBefore //Some code 2 var numberAfter = cy.get('#idOfItem') var _numberAfter = +numberAfter //Assertion expect(_numberBefore-1).equals(_numberAfter) //Same result if I use: assert.equal(_numberBefore-1, _numberAfter) }) }) Lets say _numberBefore

Java Selenium - How to Click a Button that has no ID or ng-class in AngularJS based page

浪尽此生 提交于 2019-12-11 00:33:51
问题 The following code I've used is not clicking the button and showing the error message. WebElement clickNextButton = webDriver.findElement(By.cssSelector("button[ng-class='btn-success']")); clickNextButton.click(); Error message shows "no such element: Unable to locate element. {"method":"css selector","selector":"button[ng-class='btn-success']"} I've also tried the following code segments without success: WebElement clickNext1 = webDriver.findElement(By.cssSelector("button[ng-class='pccCTRL

How do I close() and quit() Selenium driver without affecting other steps in Cucumber and Selenium?

拥有回忆 提交于 2019-12-10 19:54:09
问题 I have two feature files in Cucumber that are linked to corresponding step files. The problem is that when one of the step file finishes execution then it closes all the browser windows (because of driver.quit() ) whereby killing the execution of other step file which hasn't done processing yet. Here each step file opens a new browser window, executes the tests within it and then closes and quits the browser. Currently I have just two step files but in the future there are going to be many

How to automate Firefox Mobile with Selenium?

杀马特。学长 韩版系。学妹 提交于 2019-12-10 17:13:51
问题 I need to run Selenium tests in Firefox Mobile. Could anybody describe an easy way to do this? My investigation shows that: Firefox Mobile is not supported in Appium (one, two). Firefox Desktop has built-in Responsive Design Mode like shown on the picture: It seems that Geckodriver does not support Firefox mobile. Compared to Chromedriver Geckodriver has no mobile-specific code. There is (or there was) some way to open mobile emulation using Firefox prefs. It works by switching Firefox from

Can anyone clarify some options for Python Web automation

吃可爱长大的小学妹 提交于 2019-12-10 12:08:19
问题 I'm trying to make a simple script in python that will scan a tweet for a link and then visit that link. I'm having trouble determining which direction to go from here. From what I've researched it seems that I can Use Selenium or Mechanize? Which can be used for browser automation. Would using these be considered web scraping? Or I can learn one of the twitter apis , the Requests library, and pyjamas(converts python code to javascript) so I can make a simple script and load it into google

Automation Errors: 800706B5, 80004005, 80010108 appear for internal SAP site scrape

会有一股神秘感。 提交于 2019-12-10 10:08:33
问题 I am writing a macro that will scrape my company's internal SAP site for vendor information. For several reasons I have to use VBA to do so. However, I cannot figure out why I keep getting these three errors when I attempt to scrape the page. Is it possible that this has something to do with the UAC integrity model? Or is there something wrong with my code? Is it possible for a webpage using http can be handled differently in internet explorer? I am able to go to any webpage, even other

automate page scroll using vbscript

霸气de小男生 提交于 2019-12-10 08:19:56
问题 I need to take complete snapshot of a page using vbscript, and to do this I need to scroll a bit down. Actually I am able to take half of the page in snapshot but I need to take the remaining part also in the next snapshot. I tried using following once the page is loaded ie.document.body.doScroll("pageDown") But it is not scrolling the page down, is there any better way to do this, Actually I don't want to have a page down scroll but just 100 pixels down, Is there any way to do that? Thanks

Selenium Webdriver - element not clickable error in firefox

限于喜欢 提交于 2019-12-09 23:58:00
问题 The element not clickable error that usually appears in chrome driver happens to be showing in firefox also. The error message shown: Exception in thread "main" org.openqa.selenium.WebDriverException: Element is not clickable at point (141, 299.29998779296875). Other element would receive the click: <div class="showOnTop" id="loadingPanelContainer"></div> Command duration or timeout: 209 milliseconds Build info: version: '2.51.0', revision: '1af067dbcaedd7d2ab9af5151fc471d363d97193', time:

fill out form using vba and chrome

£可爱£侵袭症+ 提交于 2019-12-09 22:41:53
问题 currently i can accomplish this using IE Dim ie As InternetExplorer Set ie = New InternetExplorer ie.Navigate "www.google.com" ie.document.getElementByID("blah").value = "blah" im curious if there is a way to navigate to website and fill out info using other than IE with VBA for example with FireFox or Chrome i know how to navigate to other websites using any of the explorers for example Chrome as per below, but i would like to know how can fill out fields like search field on www.google.com