automation

How to handle server authentication using Geb/WebDriver

和自甴很熟 提交于 2019-12-22 14:43:10
问题 I have a web page. When I open that web page first it ask for server authentication. After providing the server authentication it allows me to navigate the web site. I have to automate that web page but because of the server authentication I am unable to move forward. How I can handle this server authentication in Geb or Web Driver 回答1: Try using this : http://username:password@site.com/page Instead of : http://site.com/page 回答2: This is called basic auth. So you can pass username and

Karate Api Testing - How to pass data from one feature file to another

可紊 提交于 2019-12-22 14:10:08
问题 I need to pass data from one feature file to another. Feature(1): Create a new user Background: * url 'http://127.0.0.1:8900/' * header Accept = 'application/json' Scenario: Create a new user Given path '/user' And request {"email" : "test@test.com", "name" : "Brian"} When method post And def newUser = $..id Then status 201 Feature(2): Call newUser from feature 1 Background: * url 'http://127.0.0.1:8900/' * header Accept = 'application/json' Scenario: Call User * def newUser = $..id * print

Karate Api Testing - How to pass data from one feature file to another

≡放荡痞女 提交于 2019-12-22 14:07:14
问题 I need to pass data from one feature file to another. Feature(1): Create a new user Background: * url 'http://127.0.0.1:8900/' * header Accept = 'application/json' Scenario: Create a new user Given path '/user' And request {"email" : "test@test.com", "name" : "Brian"} When method post And def newUser = $..id Then status 201 Feature(2): Call newUser from feature 1 Background: * url 'http://127.0.0.1:8900/' * header Accept = 'application/json' Scenario: Call User * def newUser = $..id * print

JavaFX apllication does not run with Selenium WebDriver

好久不见. 提交于 2019-12-22 13:06:10
问题 I want to use Selenium WebDriver in JavaFX application that I want to get a screenshot of a webpage and show it in ImageView in JavaFX app. This code works completely fine to take screenshot of webpage and save it: package application; import java.io.File; import org.apache.commons.io.FileUtils; import org.openqa.selenium.OutputType; import org.openqa.selenium.TakesScreenshot; import org.openqa.selenium.WebDriver; import org.openqa.selenium.phantomjs.PhantomJSDriver; public class Main{ public

How to stop chrome's Select a certificate window

十年热恋 提交于 2019-12-22 12:57:21
问题 I'm working on a selenium project, and the system I need to test is using SSL certificate. Every time when try to login the we are getting this "Select a certificate" window. Which we cannot handle with webdriver. I have tried click on ok button using AutoItx as below. But the Send("{ENTER}") is not the best option continue with. if (AutoItX.WinWaitActive("data:, - Google Chrome", "", 10) == 0) { AutoItX.WinActivate("data:, - Google Chrome"); AutoItX.Send("{ENTER}"); } Is there a way to use

Ruby Watir — Trying to loop through links in cnn.com and click each one of them

天涯浪子 提交于 2019-12-22 12:14:14
问题 I have created this method to loop through the links in a certain div in the web site. My porpose of the method Is to collect the links insert them in an array then click each one of them. require 'watir-webdriver' require 'watir-webdriver/wait' site = Watir::Browser.new :chrome url = "http://www.cnn.com/" site.goto url box = Array.new container = site.div(class: "column zn__column--idx-1") wanted_links = container.links box << wanted_links wanted_links.each do |link| link.click site.goto url

Allowed “out” parameter types in a COM automation interface

删除回忆录丶 提交于 2019-12-22 10:57:05
问题 I'm implementing COM automation (dual interface) for an application. The automation interface will be called from VBScript. I'm not quite clear on what types are allowed for the method's arguments. I do know that basically values have to fit in a VARIANT , but does that mean every parameter of type int must be passed through a VARIANT , or can one pass int directly? For example, two methods I have in my MIDL file are: HRESULT SetDate([in] int Year, [in] int Month, [in] int Day); HRESULT

Selenium move mouse cursor to element not work in Firefox [closed]

浪子不回头ぞ 提交于 2019-12-22 10:49:51
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 6 years ago . ================================ OS: Win7 Selenium: 2.33.0 Firefox: 22.0 Python: 2.7.4 ================================ I want to move the mouse cursor to the element "input" with method "move_to_element", but can't do it. Do anyone have this issue? ================================ #!/usr/bin/env

Exceed 3 hours timeout Automation Runbook Azure

半城伤御伤魂 提交于 2019-12-22 10:46:02
问题 Hello guys, I have a runbook to launch but it takes more than 3 hours to run (process of partitions) and so, it stops before being complete. I wanted to know if there is a way to exceed the 3 hours limitation. I've heared about hybrid runbooks but I'm not sure how it could solve my problem. Do you know if there is other solutions ? Thanks a lot. 回答1: If you want to stick to Azure Automation, you can use Checkpoints : Azure Automation has a feature called “fairshare”, where any runbook that

Automating IE confirmation prompt with Powershell

烈酒焚心 提交于 2019-12-22 10:45:09
问题 I have a nice powershell script that automates a particular website for my daughter. Recently they changed the site and added a nice new feature that would speed up my script by a factor of 10. The problem is the input type they use to activate this pops up a confirmation dialog. The HTML looks like this <input type=submit name='enter_all' value='Enter all' onClick="return confirm('Enter all?');"> Can I automate answering this dialog in powershell? I want the script to run in the background