FAQ Database Discussion Community


Trying to distinguish between two hidden values using an id

ruby,automation,watir
got yet another query from my still hodgepodge learning of ruby + watir. The CMS i'm writing automation for creates an item and assigns an id to it at which point i execute the code below to collect and store the id as this is used for other actions against...

geb filtering link by its content

groovy,automation,geb
I have a page with bunch of hyperlinks. I want geb browser automation suite to filter a specific link by its display value. I could do as below and it works. def links = $("a") def a =[] links.each { if (it.text() == "blah blah blah....") { a.add(it) } }...

targeting salt minions using multiple grains

automation,salt,salt-stack,devops
In our infrastructure, we set multiple grains on the minion including an 'environment' and 'component' grain. Based on this, there can be multiple minions with the same component name, each in a different environment. I want to be able to select minions based on multiple grains instead of having to...

Selenium Python document.getElementsByClassName()

python,selenium,selenium-webdriver,automation
I'm using Selenium with Python3 to automate entering data into a website. I have tried looking everywhere for how to deal with selecting an element by class if there is more than one but I can't figure out how to select the accordion-toggle[1]. Nothing happens on selenium but it works...

Remove HTML MarkUp

batch-file,automation,markup
I am automating a marking procedure for a python class. However, when I download the submissions online they include the html markup which the students may have inadvertently submitted their solutions in such as: <!DOCTYPE html><html><head><meta charset="UTF-8"></head><body><p><span style="font-family:'courier new', courier, monospace;">print("Bob and Bill Tiling Solutions Inc.")</span></p> <p><span style="font-family:'courier new', courier,...

HtmlUnit - Server (HTTP) status code is not changing after Server is turned off

java,selenium-webdriver,automation,htmlunit
By using HtmlUnit browser, I am getting the HTTP standard response code. Based on response code, we are deciding whether the server is running or not to control another thread. Problem what we are facing here is, if we stop the Server, still we get 200 (running) response code. Index...

Outlook to Excel

email,outlook,automation
I get email alerts almost constantly, which I am required to process and put into an excel spreadsheet. Is there a way that I can automate this ? I have all of the messages going into a specific folder in Outlook 2010. I want to be able to pick out...

How to set one test case for two different browsers in Protractor JS?

node.js,selenium-webdriver,automation,jasmine,protractor
I want to run same test case on two different browser but it should output another result for each other. For example, check out the test case below, one test step is capturing screenshot only for Chrome and the other one should capturing the screenshot only for FireFox. Note the...

Photoshop Script to change Font and Font Size

javascript,automation,action,photoshop
Looking for a script that changes all text within a PSD to be a certain font size and font kind, in this particular case, 'AbrilFatface-Regular'@ 101px. I then want to use this script to batch change hundreds of files using the same font and size (so no need for a...

Programmatically login to http://login.live.com

php,symfony2,automation,ui-automation,goutte
As part of a testing automation project, I need to be able to login to http://login.live.com Is that possible? I am currently using Symfony and Goutte...

Replace the name of environment variable by it's actual value from environment in a text file

powershell,active-directory,automation,environment-variables,silent-installer
I am trying to automate Active Directory installation on Windows Server 2008 using windows powershell. I created a text file with .tmpl extension and added: [DCINSTALL] ReplicaOrNewDomain=_ReplicaOrNewDomain__ Then I created an answer file in a text format: [DCINSTALL] ReplicaOrNewDomain=$env:ReplicaOrNewDomain Now I want to be able to write a script in...

How to automate to click a button which has no ID

selenium,selenium-webdriver,automation,selenium-ide
<div class="add" data-icon="'" ng-show="!editMode" ng-click="btnAdd()"> Add an Honor or Award </div> Above is the html code for the button i am trying to click (Add an Honor or Award), but this button doesn't have an unique ID, and keeps on changing the xpath as the user adds multiple data.

Selenium Webdriver UnreachableBrowserException

java,eclipse,selenium,automation,testng
I am getting this error: org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the remote browser. It may have died. Build info: version: '2.45.0', revision: '32a636c', time: '2015-03-05 22:01:35' System info: host: 'HOME', ip: '10.1.11.121', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_31' Driver info: driver.version: RemoteWebDriver at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:593) at...

Call onkeyup function while doing automation

internet-explorer,powershell,automation
I am trying to perform IE automation using PowerShell. While automating some manual task using IE object, I am able to navigate to the website and enter value in text box, but the submit button available on website can only be triggered after a key up event is fired in...

Python USB sometimes not recognized

python,python-2.7,automation,usb
I have code that is supposed to check whether a certain file exists in a USB stick that is plugged in by the user when prompted. The issue is that the script sometimes succeeds and sometimes fails on the exact same machine with the same USB stick with the batch...

How do I use Jenkins CI with Selenium?

selenium,jenkins,automation
I'm now at the level where I am able to build my own test automation framework using TestNG, through Selenium. The next stage is for me to look at kicking off automation runs, periodically using Selenium Grid. I've being doing some research on this, and the CI tool, Jenkins, keeps...

GitHub API: How to check username availability?

http,github,command-line,automation
I can send an HTTP request to the GitHub API to automate creating new repositories, delete repositories, etc. For example, given I know $user's password I can create a new repository with curl: curl --user "$user" "https://api.github.com/user/repos" -d {\"name\":\"$repo\"}" But I have been unable to any find documentation on how...

Connecting to a SQL server using watir web driver

ruby,sql-server,automation,rubygems,watir-webdriver
I need some help connecting to a SQL database held on a server to compare some values in watir webdriver. Not even sure where to start really. Is there any particular GEM i need to install My database lives on server xxx.xxx.xxx.xxx, with a username and password so I have...

Use a button to add other buttons, editText etc.

android,button,automation
I need to be able to add buttons to a layout using an "add" button. The problem is that I need each button to have an OnClickListener()/onClick method. I was thinking every time the "add" button is pressed then i would add a new button to an array but im...

Selenium Webdriver: How to verify a text that is within h2 and duplicated class

java,selenium,selenium-webdriver,automation
I want to locate the Text within the below HTML code but there are two duplicated classes. <div id="header" class="cf"> <div class="cf"> <h1> <a href="/">Text</a> </h1> I located but not sure if that is the best way to do it because the text might `appear some where else. WebElement LL...

How to read a text from a page using Helium?

java,testing,automation,qa,helium
I want to read the text showing in the picture and want to print that text using Helium. I tried the following code import org.openqa.selenium.WebDriver; //import com.heliumhq.selenium_wrappers.WebDriverWrapper; import static com.heliumhq.API.*; public class MainClass { public static void main(String[] args) { WebDriver ff = startFirefox("http://172.16.0.200:8001/"); waitUntil(Text("Streams Tech, Inc.").exists); streamstech lg...

How to web scrape on server side? [closed]

java,javascript,automation,web-scraping
I'm not sure if the title says what I needed. But that's the best way I can put it. My requirement: I want to check if a series of engine numbers (of vehicles) are registered with the local transportation authority. They have provide a web-interface for this task, but I...

How to automate file transformation with simultanous execution?

bash,automation,transformation,simultaneous
I am working on transforming a lot of image files (png) into text files. I have the basic code to do this one by one, which is really time consuming. My process involves converting the image files into a black and white format and then using tesseract to transform those...

Selenium wait until email is sent

java,selenium,selenium-webdriver,automation,webdriver
I am writing a simple program that tests the functionality of gmail and this include sending an email. I have the program send an email, and once it is acknowledged that it has been sent, it logs out. I do not want to logout while the message is being sent,...

How to execute python script on schedule?

python,automation
I have two Python scripts on my machine that I want to execute two times a day on specific time period. How do I automate this task? Since I will be away from home and thus my computer for a while, I want to upload them to a site and...

Download csv file via submit button in R

r,csv,automation,web-scraping
I want to automate the following task in R: Go to the following page with historical data: http://www.ariva.de/XXX/historische_kurse, where the XXX stands for some ticker, like e.g. DBX0BT So the URL in this case would be: http://www.ariva.de/DBX0BT/historische_kurse At the right hand bottom there is a button Download. I want to...

I can't connect and upload to FTP by command line

windows,batch-file,cmd,ftp,automation
I can't succeed to connect and upload files to some ftp by BATCH file I made. Also, I want to upload all files from this local directory. Please your help! Thanks. The code: @echo off echo user username>> ftpcmd.dat echo pass>> ftpcmd.dat echo cd /public_html/reports/>> ftpcmd.dat echo mput C:\automation\tests\HtmlReporter\*>> ftpcmd.dat...

Automizing the process of setting up a new server

linux,automation,build-automation
I'm maintaining the servers of a web game. Whenever we add a new server to our game, I have to configure many environment details and install softwares (for example, testing if some ports of the new machine can be connected from other places, installing mysql-client, pv..., copying the game server...

how to compare current time with datetime field in db continuously?

php,mysql,twitter-bootstrap,datetime,automation
I'm am working on an bootstrap website where I have get a list of tasks to do from mysql db which starts on different times of the day. I also have to pop up a reminder when each task is about to start. Table has 4 columns task_id(int), task_name(varchar), start_time(datetime),...

Is there a precompiler for JavaScript like Sass?

javascript,automation,compression,partials
Good morning, is there a precompiler solution for JavaScript like Sass for CSS ? The only features I need are the partials precompiling (to have fewer js files) and the auto-compression of the file. I googled for Coffeescript but it's not what I'm looking for and because I don't want...

A finite automaton accept no string

automation,automaton
How can a finite automaton over(0,1) doesn't accept any string? I only can think of s->a->q->F Where the final state F is empty set. Is that true please?...

Pandas: Iterate on a column one row at a time to automate a google search?

python-2.7,csv,pandas,automation
I am trying to automate 100 google searches (one per individual String in a row and return urls per each query) on a specific column in a csv (via python 2.7); however, I am unable to get Pandas to read the row contents to the Google Search automater. *GoogleSearch source...

Unable to identify the login button for naukri.com application using selenium Webdriver

java,selenium-webdriver,automation
I am trying to automate the naukri.com application and as a part of that when I launch the site it basically displays some set of pop up windows which needs to be closed before I proceed to login to the application.This specific functionality has been handled by the code where...

Azure Automation moving blobs hashtable error

azure,automation,powershell-workflow
I am trying to create a script to move blobs from one container to another after they are processed by another automation process. The code I am using is below. workflow Move-AttendeeFiles { $connectionName = Get-AutomationConnection -Name 'AzureConnection' $storageAccountName = Get-AutomationVariable -Name 'StorageAccountName' $storageContainerName = Get-AutomationVariable -Name 'toprocessContainer' $destContainerName =...

better way to automate a multiple searchbox using selenium

selenium,selenium-webdriver,automation,automated-tests
i have to automate search option in below url : https://qa.roofandfloor.com/ currently,I am selecting single dropdown one by one and searching properties and automating it,just wondering if there is more better/effective way to automate it. can someone help me on this design pattern. i know its mostly a theoretical issue,but...

My FTP batch script is stuck on “200 PORT command successful” and doesn't upload the files to server

windows,batch-file,ftp,automation
I've tried everything I found in Google results about 200 PORT command successful but nothing has helped. Can anyone assist to solve this issue please? The code of "runScript.bat: ftp -s:"C:\automation\fileup.bat" myserver.com The code of "fileup.bat: username password ascii cd "/public_html/reports/" lcd "C:\automation\tests\HtmlReporter" prompt mput * disconnect close bye The...

Counting/autofill in a text file

bash,automation
I have a very easy bash script for linux: blastn -db database -evalue 1e-5 -query 001.fasta -out 001.blast.txt -best_hit_overhang 0.1 -best_hit_score_edge 0.1 -outfmt 6 -max_target_seqs 1 & blastn -db database -evalue 1e-5 -query 002.fasta -out 002.blast.txt -best_hit_overhang 0.1 -best_hit_score_edge 0.1 -outfmt 6 -max_target_seqs 1 I need to do this 360...

I can't upload a multiple files to FTP by batch script

windows,batch-file,cmd,ftp,automation
I can't succeed to upload a multiple files to some FTP by batch file I made. Also, I want to upload all files from this local directory. The code: ftp -s:"C:\automation\fileup.bat" MYSERVER.COM USERNAME PASSWORD ascii cd "/public_html/reports/" lcd "C:\automation\tests\HtmlReporter" mput * close quit The error: C:\automation>ftp -s:"C:\automation\fileup.bat" MYSERVER.COM Connected to...

knife ec2 to vpc node

amazon-ec2,automation,chef,knife
I am trying to launch node in EC2 VPC using chef knife ec2 server create to launch ec2 instance into VPC, But I looking a flag to specify vpc info. Anyone know how to spin up ec2 instance into vpc using knife ec2 server create ? Thanks...

How to automate NuGet package creation using Jenkins?

jenkins,automation,package,nuget,nightly-build
For one of my projects I am using many dependencies in the form of NuGet packages. When I change any of them, I need to recreate the package and deploy it every time. We currently have Jenkins setup as our task runner. I was wondering is there a way to...

Automatically import REST APIs from GitHub / via API into API Manager?

import,automation,swagger,bluemix,swagger-2.0
Does the API Manager / Bluemix provide an interface (API, hook) to automatically update API definitions when I push Swagger 2.0 API definition changes to a GitHub repository?

Synchronize 2 online RSS readers

automation,rss,rss-reader,digg,feedly
I need to connect Feedly and another online RSS/podcast reader, Dig Reader. I want to synchronize them. If I suscribe something in Feedly, I want the subscription to be automatically added in Dig Reader. I did the same using IFTTT with Diigo and Delicious, but I don't know how to...

Setup Auto-Login/Visit Specific URL? [closed]

php,html,unix,cron,automation
There is a website where I want to be logged in always to be seen 7/24 online, because there is a queue among users and you go forward more on this queue if you are more often online. I have a linux server which I am planning to use for...

Testing for path in SysWOW64 returns true if path does not exist, but does exist in System32

excel,powershell,automation,system32,syswow64
NOTE: I am on a 64-bit system. I am having trouble finding articles regarding my current situation. I using PowerShell to test if a certain path exists: "C:\Windows\SysWOW64\config\systemprofile\Desktop" and it returns true even though the Desktop folder does not exist in SysWOW64. I know it is related to the fact...

Writing PHP variable based on jQuery calculations and displaying predetermined value

php,jquery,list,variables,automation
Context: I'm trying to make an automatically generated list that has a different amount of items on each page. Each item needs a name and a link, based on its place on the list. Here's an example with two items for the problematic part: PHP variables: $item_link_1 = "link1"; $item_name_1...

Appium Android Test case, How does it work?

java,android,eclipse,automation,appium
Hello I am trying to learn Appium to automate a test case on my app. I managed to run a simple script, but I do NOT understand the logic of of the running process like android life-cycle. What is the cycle for a testcase. Because When I run the code...

Finding and moving PDF and DOC files to different directories using python

python,automation
I trying to find and move resumes in PDF and DOC formate to different directories, PDF files in /PDF dir and DOC files in /DOCX dir. My concerns are; Are my regular expressions for finding the PDF and DOC files correct? The resumes are named as for example, john right...

Get ec2 instance metadata from instance id

python,amazon-ec2,automation,boto
Hi I am using boto to spin up ec2 spot instance. I am having trouble getting instance hostname from instance id. there is easies way to do from instance itself "wget -q -O - http://169.254.169.254/latest/meta-data/instance-id" but I am looking for way to get metadata using instance id Any Help Thanks...

running same test with different dataprovider in testng

java,testing,automation,testng,testng-dataprovider
For example: Data provider 1: dataA Data provider 2: dataB, dataC Data provider 3: dataD, dataE, dataG So my test takes in a data provider. But I want it to chose different data provider for different test type depending on test group. For example if I am running group "smoke"...

Need to retrieve xpath or css from WebElement Object at run time

java,selenium,selenium-webdriver,automation,webdriver
What are the possible ways to retrieve xpath or css (any logic) from WebElement object? For example I have created WebElement by following way: WebElement obj=driver.findElement(By.cssSelector(".hello")); Now I want to get back a By object from this WebElement Object or if I am able to retrieve xpath or css then...

MSBuild confusing behavior with Target Outputs & Returns

.net,build,msbuild,automation,build-system
I'm trying to understand the logic behind Outputs & Returns parameters. And I found very confusing behavior in case of using Outputs & Returns attribute. e.x. I created a project with 2 targets "Build" and "InternalTarget". The first target defines its output via Outputs attribute and the second defines output...

How to click the back navigation button of the browser using helium?

automation,helium
I am trying to implement helium in my project. I checked the API doc of helium but I didn't find any command to click the back navigation button of the browser. In the API doc found solution to launch the browser. Code is as following startFirefox(); startFirefox("google.com"); So I would...

Selenium deal with equal elements

html,selenium,xpath,automation,webpage
I am trying to do a progogram that connects to a website, and clicks all the buttons on it. The problem is that the buttons are "equal", and by equal I mean with the same text in them, same link and same css. Consider the following structure: <content> <line1> <block1>...

Selenium Webdriver: Element Not Visible Exception

java,selenium,selenium-webdriver,automation,qa
Here is my code to click a simple login button on this Website import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; public class Reports { public static void main(String[] args) { WebDriver driver = new FirefoxDriver(); driver.get("https://platform.drawbrid.ge"); driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS); driver.findElement(By.xpath(".//*[@id='_loginButton']")).click(); } } I am getting following error: Exception in...

Identifying clickable element in angularjs - ng-binding

angularjs,automation,protractor
I have a search field with results powered by ElasticSearch and I am automating the selecting of one of the results. CSS and XPath do not yield very much in terms of selecting the element and clicking it so I am hoping for some help. Code: li data-ng-repeat="match in matches"...

How to use vim to facilitate class definitions in sqlalchemy models?

python,class,vim,automation,sqlalchemy
I'm defining database-classes for SQLAlchemy, like so: class People(Base): __tablename__ = 'people' id = Column(Integer, primary_key=True, unique=True) name = Column(Text) haircolor = Column(Text) height = Column(Numeric) def __init__(self, id, name, haircolor, height): self.id = id self.name = name self.haircolor = haircolor self.height = height Writing this out manually is tedious...

How to use regex non capturing group for string replace in java

java,regex,automation
I had a requirement to change AssemblyVersion on new build. I do it using java code string.replaceAll(regexPattern,updatedString); This code works fine with normal regex patterns, but I am not able to use non-capturing groups in this pattern. I want to use non-capturing groups to make sure I don't capture patterns...

Automating database creation using an Azure Powershell Runbook

powershell,azure,automation
I am attempting to automate the creation of a database server and database using an Azure powershell runbook. I have managed to create the server ok, but when I then try to connect to it to create the database and user, I hit firewall issues. I cannot find a way...

schedule and automate sqoop import/export tasks

shell,hadoop,automation,hive,sqoop
I have a sqoop job which requires to import data from oracle to hdfs. The sqoop query i'm using is sqoop import --connect jdbc:oracle:thin:@hostname:port/service --username sqoop --password sqoop --query "SELECT * FROM ORDERS WHERE orderdate = To_date('10/08/2013', 'mm/dd/yyyy') AND partitionid = '1' AND rownum < 10001 AND \$CONDITIONS" --target-dir /test1...

how to make a script (PHP) that login to a site (No API) and clicks a button?

javascript,php,automation
I want to create a script that logins to a site , clicks a buttons and that's it. I only need vocabulary (keywords) to search on google , because I'm really lost. if you're nice , make an example ! thank you. ...

How to retrieve browser web console log and write it into a file?

javascript,automation,casperjs
I am trying to process the log from a specific webpage. Are there any suggestions how to retrieve the logs and put into text file from any web page using CasperJS?

How to maximize browser window using helium?

java,automation,helium
I am trying to implement helium in my project, I checked the API doc of helium but I didn't find any commend to maximize the browser In the API doc found solution to launch the browser. Code is as following startFirefox(); startFirefox("google.com"); So I would appreciate if any one can...

How do I find an AutomationElement when using task scheduler and user is logged off?

c#,selenium,automation,ui-automation,automationelement
I have an application that is set to run at a specific time of day when the user is logged off. It uses a combination of Selenium and UI Automation in C# to download a file every day. When run logged in, everything is fine. However, when I run the...

Excel VBA - Formatting script for automation

excel,vba,excel-vba,automation
So here's what I'm trying to do: Open file: Pc_Profile Create new sheet: Sheet1 Copy desired cells from Pc_Profile to Sheet1 (see script below) Copy entire Sheet1 to new excel file: db.xls Rename sheet to content of cell A5 Create new sheet for next script run Basically I'm trying to...

Looking to run automated jobs in .NET application

c#,.net,sql-server,automation,scheduled-tasks
Within a .NET application (.NET Framework 4.5), the following is occurring: A single record in a table in an SQL Server database is referred to as a job When the job is run, C# code is called Briefly to explain what it is doing, the job, when run, converts PDFs...

Setting Dependencies/Triggers in bamboo?

automation,dependencies,bamboo
Im wondering if I can get some help in relation to Bamboo. I am very very new to this system. I am able to make plans etc but now I need to Automate 1 of those plans instead of manually kicking it off. Unlike the other plans I cant time...

How to upload apk file to sauce labs and get saucelabs url of temporary storage?

android,selenium,curl,automation,saucelabs
I am new to saucelabs.When I tried the following in cmd prompt to upload my apk file to saucelabs, I am getting the following Error.Can you pls help in this? C:\curl -u gkyrreport:e4fc33sfdsf45--41b2-9eeed6638 -X POST –H “Content-Type:application/octet-stream” “https://saucelabs.com/rest/v1/storage/gkyrreport/mine.apk?overwrite=true” –data-binary @mine.apk curl: (6) Could not resolve host: -H; Host not found...

Why DWebBrowserEvents2::NewProcess() receives pWB2==NULL in second parameter

internet-explorer,com,automation,bho
This dispatch is also known as DISPID_NEWPROCESS. If you start a new IWebBrowser2 with CoCreateInstance(CLSID_InternetExplorer), then it will by default start in Protected Mode (you can see it in Internet Options | Security | Internet | Enable Protected Mode). However, if you then Navigate() to an URL that is in...

Vagrant's use against Hyper-V

automation,vagrant,hyper-v
I am getting my feet wet with Vagrant. I am trying to use it to auto deploy a number of Windows Server 2012 VMs automatically. I am running into some bugs in that Hyper-V does not seem to be a first class citizen in terms of attention and support from...

Using result of raise_error (capybara)

ruby-on-rails,rspec,automation,capybara
I'm using capybara to do some web automation. There are various points in the code where it says things like raise_error 'Failed as this is a duplicate' if duplicate? or raise_error 'Failed to log in' if logged_in? == false All of this is abstracted to a module and I'd prefer...

Tool to monitor & log system metrics during automated Java performance tests

java,performance,automation,monitoring
We have an application using Spring Integration in its core, and have created performance tests to see what is the processing speed (msgs/sec) for different generated input types. This process is automated, so whenever such test is run, a separate instance is created in cloud, and disposed after done &...

Can't use Class to automate Windows file upload using AutoIt

automation,autoit
I am trying to use autoit for Windows file upload. I am clicking a browse button which will open file upload popup. I want autoit to type the location of the file and click open. I need to use FF, Chrome, and IE for testing. I am able to get...

Test Run deployment issue: 'Oracle.ManagedDataAccessDTC'

oracle,automation,coded-ui-tests
I just configured the code on my machine. (VS2013 Premium) and I am not able to run any of the test case because of one following error : "Warning: Test Run deployment issue: The assembly or module 'Oracle.ManagedDataAccessDTC' directly or indirectly referenced by the test container 'e:\cs\qa_automation\all_team_current_automation\international\lda_automation\bin\debug\lda_automation.dll' was not found."...

Appium_lib with Xcode 6 page elements mssing

ios,ruby,automation,appium,pry
I just started iOS Automation with Appium v1.3.5 by following the setup and sample app test tutorial that appium provides here - http://appium.io/slate/en/tutorial/ios.html?java#starting-the-console. Using Pry on the Appium Ruby Console page command to filter out elements I noticed that elements that were not on screen, meaning those that i had...

Ruby Mechanize form input field text

ruby,csv,automation,web-scraping,mechanize
Resolved - the "abc = list.scan(/[([^)]+)]/).last.first" line was correct but also included the quotes, which the website search form did not accept. Corrected it to abc = list.scan(/\"([^)]+)\"/).join. Thanks for all the help. I have to automate a search using a list of 100 keywords that is in a csv...

Logging actual error when script fails

powershell,automation,error-logging
I have a script here that reads a list of computers and changes the administrator password. When the script is ran, it'll have a log file that says whether the task succeeded or fail. But I also want to log the actual error to the log when it fails. How...

How to store a random value and call it from a click function in selenium webdriver by Jasmine JS?

javascript,node.js,selenium-webdriver,automation,jasmine
I want to save a random number between 1 to 31 and use it from a 'click' function in order to click about the saved random number by a 'linkText' locator. Is it possible? I need something like: var randomDay = Math.floor(31*Math.random() + 1); element(by.linkText(randomDay)).click(); The full test is below:...

How to call javascript function in VBA

javascript,vba,excel-vba,automation,pop-up
I need to by pass an IE confirm 'OK'/'Cancel' pop-up message. I have a problem running a javascript function in my vba script. see below for the javascript codes function ConfirmSave() { var Ok = confirm('Are you sure all Documents and Information are attached and correct before saving?'); if(Ok) return...

Can't switch windows during testing by Webdriver JS

javascript,selenium-webdriver,automation,jasmine,protractor
I can't switch windows during my testing by Selenium Webdriver using Jasmine JS. Runner: Protractor JS Platform: Selenium Webdriver on Node.JS Code framework: Jasmine JS The code is below, Please note the second code block: describe('payments', function() { // beforeEach(function() { // browser.ignoreSynchronization = true; // }); // afterEach(function(){ //...

Saving Excel workbook as PDF gives me an OLE error 800A03EC

excel,delphi,automation,ole
I have the following function that I want to use for creating a PDF from Excel. But when trying to save the PDF I get an OLE error 800A03EC that I simply can't figure out. I use the same approach to create PDF from Word and that works just fine....

import folder of .txt files into word document

vba,ms-word,automation,word-vba
I've found a lot on importing folder of .txt files into excel, but not many on importing .txt files into word. I'm trying to get my macro to open all .txt files in a specific folder and import them into a single word document, with each .txt file having its...

Excel to Powerpoint (But with tables not pictures)

excel,excel-vba,automation,powerpoint
I am attempting to automate powerpoint creation with table created in Excel. My issue is after the table pastes into powerpoint, it is not considered 'selected' right away. I get an error that generally that says something like 'no object selected' or "Method 'ShareRange' of object 'Selection' failed". If I...

Is there a way to tell kubernetes to update your containers?

automation,docker,kubernetes
I have a kubernetes cluster, and I am wondering how (best practice) to update containers. I know the idea is to tear down the old containers and put up new ones, but is there a one-liner I can use, do I have to remove the replication controller or pod(s) and...

How to verify `onclick` event in javascript for an Anchor tag using selenium webdriver

html,testing,selenium-webdriver,automation
How to verify the onclick event asscoiated with the anchor tag in the html below: <div class="itp-sb-left" style="float:left; width:100%; border:solid 1px #cccccc; padding:2px 0 2px 5px;"> <a title="Submit to Facebook" target="_parent" onclick="window.open('https://www.facebook.com/sharer.php? s=100&p[title]=...

Resolving Chef Dependencies

automation,dependencies,chef
In my lab, I am currently managing a 20 nodes cluster with Cobbler and Chef. Cobbler is used for OS provisioning and basic network settings, which is working fine as expected. I can manage several OS distributions with preseed-based NQA installation and local repo mirroring. We also successfully installed chef...

TestNG: java.lang.NullPointerException in the @Test Method

unit-testing,selenium,automation,testng
Please help me in this, @BeforeClass runs successfully, but going into the @Test method it throws the below exception. The code in the `@Test' doesn't run properly. I was able to run the code successfully before few months but now it is not working. I'm using selenium-server-standalone-2.39.0.jar. The exception: java.lang.NullPointerException...

How to set up a scheduled API call on a website?

php,api,automation
I'm just learning a little bit about APIs and I just wanted to figure out how I could schedule an API to make a specific call automatically. The situation that I would like to solve is this: I'm using SendGrid to help me to deliver mail from a contact form...

How to tap / click at x,y position automatically?

android,button,automation,click
I have created one AlertDialog with OK and CANCEL button's in my application, when ever that alert dialog opened. i have to tap/click on OK button automatically without user interaction, i have x,y position of OK button. How to implement this please share with me, My main requirement is how...

How do I check enable and disabled button using helium?

testing,automation,qa,helium
The code of attached button is: <div style="position: absolute; right: 0; top: 0;"> <button class="prev btn btn-warning disabled" style="padding: 4px 8px;"> <i class="fa fa-chevron-left" style="margin: 0"/> </button> <button class="next btn btn-warning" style="padding: 4px 8px;"> <i class="fa fa-chevron-right" style="margin: 0"/> </button> </div> How can I check that which one is...

I want all PDF or DOCs to come first in the output [closed]

python,automation
So I came up with this code that sorts out PDF and DOC files, I am getting the output but I need then to be in order. I want all PDF or DOCs to come first in order. import os, sys, re pdf = re.compile(r'.*Shandeep.*\.pdf') doc = re.compile(r'.*Shandeep.*\.doc') for r,...

Installing Teamcity build agent as a user: failed to install the service. selected account does not have enough rights

automation,continuous-integration,teamcity,build-agent
I want to install a TeamCity BuildAgend as a user. When entering my user credentials here: I always get this error: NOTE: My account (user) is Administrator with full permission! How can I do this?...

How to look for click on the checkbox event on a specific cell on the workbook.

excel,vba,excel-vba,automation
Hi I have lots of sheets, in which I have a many cell on the column AI, which has checkbox in it. I want to have an event handler on click of that checkbox on that column A1. I tried this code: Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Selection.Count...

Appium: isDisplayed() vs findElements(by).size

java,iphone,testing,automation,appium
Traditionally I always checked for the presence of objects in appium using: int count = driver.findElements(by).size(); if (count == 0) { Logger.LogMessage("ElementDoesNotExist: " + by, Priority.Medium); return true; } else { Logger.LogMessage("ElementDoesExist: " + by, Priority.Medium); return false; } However, I see there is now a isDisplayed() method: driver.findElement(by).isDisplayed() Anyone...

How to call browser.get only once in a script?

javascript,angularjs,automation,jasmine,protractor
I am new to protractor, right now I am putting browser.get(URL) within the first 'it' statement and then for my afterEach statement I make the browser go back to the homepage. I am wondering if there's a better place to put the browser.get statement to make my tests more module?...

Xquery Assertion for SoapUI multiple modes

xml,automation,xquery,soapui
I'm trying to create an assertion for a Response that needs to looks like this: <Names> <NameList PropertyName="Record"> <Names> <SimpleValue Value="Date :xx"/> <SimpleValue Value="Name :xx"/> </Names> </NameList> <NameList PropertyName="Record"> <Names> <SimpleValue Value="Date :xx"/> <SimpleValue Value="Name :xx"/> </Names> </NameList> </Names> The assertion should be an exact match. I have come up...

perl automate installation of SAX module

perl,shell,automation,cpan
One of my perl script uses XML::SAX module. As this script would be run from any system on the network, I am working on writing a shell script which would automatically download the module and install it in a private lib. The script works fine but in the middle of...

selenium java. Unable to locate element

java,selenium,selenium-webdriver,automation,webdriver
Please can someone point me to the right direction with below code? driver.findElement(By.id("div#h4clock a.location").equals("London")); I used getText("London") but it did not work. I am quite new so any advise would be very much appreciated. I also want to have a string to store the element London and display it using...

Appium IOS automation using Java : get element using accessibility Id?

java,ios,automation,appium
I am new to IOS automation using appium. I can access elements and do automation using XPath like this driver.findElement(By.xpath("//UIAApplication[1]/UIAWindow[2]/UIASecureTextField[3]")).click(); I would like to access elements using the accessibility label name given. When using the appium inspector I can see that the accessibility name is displayed under the parameter Value...

What to do when waiting for an element is not enough?

selenium,automation,automated-tests
I am writing selenium test scripts using the industry standard of webdriver waits before interacting with elements, but I still frequently find my tests are failing, and it seems to be due to a race condition. Here's the example I have been running into lately: Go to the product catalog...

Bash script not returning any output

linux,bash,shell,scripting,automation
I'm a newbie in the linux environment, and I'm starting to create an automated smoke test for several commands we frequently use at our company. Basically, running some kind of shell script that runs through multiple commands and also validates the command's output. The first test cases I started writing...