Menu
  • HOME
  • TAGS

Use a button to add other buttons, editText etc.

android,button,automation

set all the clicklisteners as you wich! call findViewById(R.id.btnSecond).setVisibility(View.GONE); on creat, then when clickin the first button Button btnSecond; ... public void onClick(View v) { findViewById(R.id.btnSecond).setVisibility(View.VISIBLE); if (btnSecond.getVisibility() == View.VISIBLE); { findViewById(R.id.btnThird).setVisibility(View.VISIBLE);} } this way you can put all your information in the java file and all buttons in xml,...

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

java,selenium,selenium-webdriver,automation

Go by the following css to identify the element more precisely. And, the id header should be unique and that should be enough to uniquely identify this element By css = By.cssSelector("#header div.cf>h1>a"); WebElement element = driver.findElement(css ); String text = element.getText(); ...

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

You can do that with a simple replacement like this: $f = 'C:\path\to\your.txt' (Get-Content $f -Raw) -replace '\$env:ReplicaOrNewDomain', $env:ReplicaOrNewDomain | Set-Content $f or like this: $f = 'C:\path\to\your.txt' (Get-Content $f -Raw).Replace('$env:ReplicaOrNewDomain', $env:ReplicaOrNewDomain) | Set-Content $f Note that when using the -replace operator you need to escape the $ (because otherwise...

Looking to run automated jobs in .NET application

c#,.net,sql-server,automation,scheduled-tasks

If you can insert the first part of your requirement (to look for all jobs that have a 'next run date' of the current date (the 'next run date' will be stored in a table/column in SQL Server)) in the C# application that is already executed manually then you only...

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

import,automation,swagger,bluemix,swagger-2.0

This is currently not possible. Your best bet is to manually re-import the Swagger using the GitHub raw URL every time you update it; however, doing this will require that you create a new API via the import, remove the old API, and then add the new to the same...

Python USB sometimes not recognized

python,python-2.7,automation,usb

Apologies for the extremely late update. There is no bug in the code. I determined it was a hardware issue. The USB keys I was using were cheap and poor quality. I've advised the production team to use different USBs and since have not encountered this failure.

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

java,selenium-webdriver,automation

@AK17: Your code had 2 problems 1.You were not switching to parenthandle after closing the pop-up windows, I added the code driver.switchTo().window(parenthandle); 2.Your locators for username,password and login button were not correct Working code, try this: public class naukri { WebDriver driver = new FirefoxDriver(); @Test public void pagelaunch() throws...

Counting/autofill in a text file

bash,automation

You can achieve this using a bash for loop - http://www.cyberciti.biz/faq/bash-for-loop/ This would be the relevant example from that link #!/bin/bash for i in {1..5} do echo "Welcome $i times" done So for your example it would look something like this #!/bin/bash for i in {1..360} do blastn -db database...

How to web scrape on server side? [closed]

java,javascript,automation,web-scraping

Java has a library called JSoup, which provides a mostly-familiar api that uses css selectors. And obviously there are built-in functions that can get you the html from a given URL. Put those together and you've got a server-side scraper [edit] Your question, on a re-read, isn't just about scraping...

geb filtering link by its content

groovy,automation,geb

You can select by text in Geb: $("a", text: "blah blah blah...") If you want to reuse a selector and filter by text then you can indeed use filter(): def links = $("a") def linksWithText = a.filter(text: "blah blah blah...") ...

better way to automate a multiple searchbox using selenium

selenium,selenium-webdriver,automation,automated-tests

You have to understand core of your application, how it populates data in drop down, how it searches the query. That'd help you to prepare test properly. For an instance if you select property type as plot then it disables the bedrooms drop-down without knowing about city you have selected.So...

How to execute python script on schedule?

python,automation

You can use cron for this if you are on a Linux machine. Cron is a system daemon used to execute specific tasks at specific times. cron works on the principle of crontab, a text file with a list of commands to be run at specified times. It follows a...

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

python,class,vim,automation,sqlalchemy

snippets are like the built-in :abbreviate on steroids, usually with parameter insertions, mirroring, and multiple stops inside them. One of the first, very famous (and still widely used) Vim plugins is snipMate (inspired by the TextMate editor); unfortunately, it's not maintained any more; though there is a fork. A modern...

Appium Android Test case, How does it work?

java,android,eclipse,automation,appium

In your tests, it is essential to not have test dependencies, meaning that one test should not depend on the output of another test. Each test should be unique and independent on its own. Thus, the need to order your tests is eliminated. The JVM decides at runtime at random...

GitHub API: How to check username availability?

http,github,command-line,automation

There is no way to create new users using the API. If you wanted to do this automatically, you would have to jump through a lot of hoops, including automatically confirming email addresses and you would probably be violating the TOS. Why would you want to do that? Checking for...

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

java,ios,automation,appium

You should be able to use the findElementByAccessibilityId(String using) method in Java. More info on it here: http://appium.github.io/java-client/io/appium/java_client/FindsByAccessibilityId.html ...

Xquery Assertion for SoapUI multiple modes

xml,automation,xquery,soapui

To constrain the output, refer to the variable in your outer loop: { for $y in $x/Names/SimpleValue return <SimpleValue>{($y/@Value)} </SimpleValue> } ...

Excel VBA - Formatting script for automation

excel,vba,excel-vba,automation

A couple things that are good practice to get into before I get to your actual question: 1) Any macro that you expect to run a long time should have Application.ScreenUpdating = False before any actual work is done in the code, this tells Excel not to bother with changing...

Synchronize 2 online RSS readers

automation,rss,rss-reader,digg,feedly

What you're looking at would be "OPML subscriptions"... but AFAIK, this does not exist in neither Feedly nor Digg. Now, another "trick" would work and provide the same "result", even though this is not exactly what you're looking for. If you use a service to "combine" these feeds and generate...

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

javascript,angularjs,automation,jasmine,protractor

If you want to call browser.get() only once for all of the tests in the suite, use beforeAll(): The beforeAll function is called only once before all the specs in describe are run, and the afterAll function is called after all specs finish. These functions can be used to speed...

perl automate installation of SAX module

perl,shell,automation,cpan

Configure your cpan client to use follow as the prerequisites_policy. In the cpan shell, enter: o conf prerequisites_policy follow o conf commit ...

Selenium Webdriver UnreachableBrowserException

java,eclipse,selenium,automation,testng

Use @BeforeSuite and @AfterSuite instead of @BeforeClass and @AfterClass @AfterClass public void CloseBrowser() { driver.close(); System.out.println("Closing Browser"); } Basically closing the current browser instance after the first class and thus, the driver instance is not valid to run the tests for next class. You can test this by commenting out...

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

html,testing,selenium-webdriver,automation

As far as I understand you wish to verify the following onclick JS event: window.open('https://www.facebook.com/sharer.php? s=100&p[title]=...

Photoshop Script to change Font and Font Size

javascript,automation,action,photoshop

This works like a champ: if(app.documents.length != 0){ var doc = app.activeDocument; for(i = 0; i < doc.artLayers.length; ++i){ var layer = doc.artLayers[i]; if(layer.kind == LayerKind.TEXT){ layer.textItem.font = "REPLACE WITH POSTSCRIPT FONT NAME"; layer.textItem.size = new UnitValue(REPLACE WITH FONT SIZE, "px"); } } } ...

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

python,automation

No, your regexes are not correct you can easily test them in python shell: In [17]: a Out[17]: [u'john right ResumeQA.doc', u' abcResumeC.doc', u' ShawnResume.pdf', u' johnright_ResumeQA.pdf'] In [20]: pdf = '\b\w*{resume}\w*\.[pdf]\b' In [21]: for j in a: print re.findall(pdf, j) ....: [] [] [] [] as you see nothing...

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

java,performance,automation,monitoring

Command-line tools come to help for this kind of a scenario: On a Linux/Solaris based environment: Before you run/trigger your JVM for Spring based application, you can run tools like vmstat, sar in a background mode with its output redirected to a flat file - which helps capture CPU, Memory...

Call onkeyup function while doing automation

internet-explorer,powershell,automation

If you already have an event/handler attached to an element (onkeyup="doUpdate()") you can trigger it programmatically by using the fireEvent method on the element: $url = 'http://...' $ie = New-Object -COM 'InternetExplorer.Application' $ie.Navigate($url) do { Start-Sleep -Milliseconds 100 } until ($ie.ReadyState -eq 4) $ie.Visible = $true $el = $ie.Document.getElementById('txtFormID') $el.FireEvent('onKeyUp')...

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

selenium,automation,automated-tests

As we discovered in comments, updating Firefox to the latest version did the trick. The code looks really good to me and makes total sense. What I would try is to move to the element before making a click: Actions builder = new Actions(WebDriver); IWebElement saveButton = wait.Until(ExpectedConditions.ElementIsVisible(By.CssSelector(".button-wishlist"))); Actions hoverClick...

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

It should be like this: var randomDay = Math.floor(31*Math.random() + 1); var randomDayLink = randomDay.toString(); element(by.linkText(randomDayLink)).click(); ...

Outlook to Excel

email,outlook,automation

Consider developing a VBA macro or an add-in if you need to distribute the solution on multiple PCs. If you just need to automate Outlook, see How to automate Outlook from another program. You can handle the NewMailEx event of the Application class which is fired when a new item...

Setting Dependencies/Triggers in bamboo?

automation,dependencies,bamboo

A dependency tree is usually setup as a parent triggering one or more child plans. In this case you could set the three plans to build sequentially - Plan 1 completion triggers Plan 2, and Plan 2 completion triggers Plan 3. The downside is a longer overall time to build,...

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

javascript,automation,casperjs

You can use the remote.message event to receive all console.log() from the page. Using that, you can write them into a file using PhantomJS' fs module (fs.write()). var fs = require('fs'); casper.on("remote.message", function(msg){ fs.write("file", msg+"\n", "a"); }); ... ...

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

automation,helium

Well I don't find any way to implement click back navigation of the browser using only helium, So I integrated selenium along with helium getDriver().navigate().back(); It worked for me...

Selenium wait until email is sent

java,selenium,selenium-webdriver,automation,webdriver

After clicking on Send button try to wait until loading text disappear. //Click send driver.findElement(By.xpath("//div[text()='Send']")).click(); //wait for element to disappear waitForElementToDisappear(By.xpath("//div[contains(text(),'Loading')]")); or //wait for element to appear waitForElementToAppear(By.id("link_undo")); void waitForElementToDisappear(By locator) { int i=0; while(isElementPresent(locator)) { Thread.sleep(100); i++; if(i>50) { break; } } } void waitForElementToAppear(By locator) { int i=0;...

Automating database creation using an Azure Powershell Runbook

powershell,azure,automation

After you create the server add the firewall rule that allows Azure services access to it. New-AzureSqlDatabaseServerFirewallRule -ServerName [your_server_name] -AllowAllAzureServices ...

Trying to distinguish between two hidden values using an id

ruby,automation,watir

The problem is actually with the way the form_element is located rather than how the button is clicked. The line: form_element = $browser.hidden(:name => 'shopProductVariantHeadingID', :value => "#{@@prodvarid}").parent Will always return the Out of Stock form; never then Un-Published form. This is because Watir will find the first matching hidden...

running same test with different dataprovider in testng

java,testing,automation,testng,testng-dataprovider

What about to use one data provider which returns different data - based on current test group: @DataProvider(name = "myDataProvider") public Object[][] testDataProvider(ITestContext context) { List<String> includedGroups = Arrays.asList(context.getIncludedGroups()); if(includedGroups.contains("myGroup")) { return dataA; } else if (includedGroups.contains("myOtherGroup")) { return dataBC; } //... } ...

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

android,button,automation,click

Just call the performClick() method. See the View docs for reference. Button button = (Button) findViewByid(R.id.mybutton); button.performClick(); Or, if developing for Ice Cream Sandwich (API Level 15), the callOnClick() method was added. performClick() is more than suitable for your needs, though. For a Alert Dialog interface positive button, you can...

targeting salt minions using multiple grains

automation,salt,salt-stack,devops

I just came across the info I was looking for but apparently missed earlier. This can be done with compound matching salt -C '[email protected]:prod and [email protected]:accounts' test.ping More documentation can be found here: http://docs.saltstack.com/en/latest/topics/targeting/compound.html...

Logging actual error when script fails

powershell,automation,error-logging

Change this: catch { $status = "FAILED" Write-Verbose "`tFailed to Change the administrator password. Error: $_" } to this: catch { $status = "FAILED" Write-Verbose "`tFailed to Change the administrator password. Error: $_" $errmsg = $_.Exception.Message } to preserve the error message(s). And change this: if($Status -eq "FAILED" -or $Isonline...

import folder of .txt files into word document

vba,ms-word,automation,word-vba

here is something to get you started Word 2010 Edit this should allow you to open all txt files in one document and save it Option Explicit Sub AllFilesInFolder() Dim myFolder As String Dim myFile As String Dim wdDoc As Document Dim txtFiles As Document Application.ScreenUpdating = False myFolder =...

How to automate to click a button which has no ID

selenium,selenium-webdriver,automation,selenium-ide

Use css [class='add'][ng-click='btnAdd()'] xpath is also another option //div[contains(.,'Add an Honor or Award')] Or, //div[@class='add'] ...

Automizing the process of setting up a new server

linux,automation,build-automation

Have you looked at Docker, Ansible, Cheff or Puppet? In Docker you can build a new container by describing required operations in docker file. And you can easily move container between machines. Ansible, Cheff and Puppet are systems management automation tools....

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

excel,delphi,automation,ole

I don´t think that converting to PDF would be a normal SaveAs. You should try exporting it, as said here

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

java,regex,automation

Why not use looka-head / look-behind instead? They are non-capturing and would work easily here: str = str .replaceAll( "(?<=\\[assembly: AssemblyVersion\\(\"\\d\\.\\d\\.).*(?=\"\\)\\])", "4.0" ); ...

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

python,automation

I want all PDF or DOCs to come first The order is not defined by the order you defined your Regular Expressions. You will need to do some post processing if you wish to print in order. import os, sys, re pdf_list = [] doc_list = [] pdf =...

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

php,html,unix,cron,automation

Login and obtain a session with cURL (example code from the Internet): $username = 'myuser'; $password = 'mypass'; $loginUrl = 'http://www.example.com/login/'; //init curl $ch = curl_init(); //Set the URL to work with curl_setopt($ch, CURLOPT_URL, $loginUrl); // ENABLE HTTP POST curl_setopt($ch, CURLOPT_POST, 1); //Set the post parameters curl_setopt($ch, CURLOPT_POSTFIELDS, 'user='.$username.'&pass='.$password); //Handle...

Bash script not returning any output

linux,bash,shell,scripting,automation

Your line continuation characters \ at the end of the sudo lines are making the if part of the command line you're running. Get rid of those, and you should start to see syntax errors because you don't have ; after the conditions for your if statements before then Also,...

MSBuild confusing behavior with Target Outputs & Returns

.net,build,msbuild,automation,build-system

From Target element documentation, Remarks section: Before MSBuild 4, Target returned any items that were specified in the Outputs attribute. To do this, MSBuild had to record these items in case tasks later in the build requested them. Because there was no way to indicate which targets had outputs that...

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

java,selenium-webdriver,automation,htmlunit

I am unable to reproduce, possibly WebClient is differently configured. With latest version, the below successfully handles stopping/starting the server: try (WebClient webClient = new WebClient()) { while (true) { try { int status = webClient.getPage("http://localhost/test.html").getWebResponse().getStatusCode(); System.out.println(new Date() + " " + status); } catch(Exception e) { System.out.println(e.getMessage()); } Thread.sleep(1000);...

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

java,selenium,selenium-webdriver,automation,webdriver

Try implemeting below JavaScript functions. // ************************************************************************************************ // XPath /** * Gets an XPath for an element which describes its hierarchical location. */ this.getElementXPath = function(element) { if (element && element.id) return '//*[@id="' + element.id + '"]'; else return this.getElementTreeXPath(element); }; this.getElementTreeXPath = function(element) { var paths = []; //...

Azure Automation moving blobs hashtable error

azure,automation,powershell-workflow

The Connect-Azure runbook takes as a string the connection asset name. You are passing it the connection, itself. Pass the connection name instead.

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

php,mysql,twitter-bootstrap,datetime,automation

You can do the check on each page load. And if you expect a user to stay on the same page for a long time, you can setup a timer (setInterval in JS) that will make an ajax request to check if there is a task to display

selenium java. Unable to locate element

java,selenium,selenium-webdriver,automation,webdriver

The selector does not look like as an id that cssSelector. Try driver.findElement(By.cssSelector("div#h4clock a.location")).getText().equals("London"); Edit: WebElement city = driver.findElement(By.cssSelector("div#h4clock a.location")); String getcity = city.getText(); System.out.println(getcity); ...

Resolving Chef Dependencies

automation,dependencies,chef

In chef itself, I know no method for orchestrating (that's not chef Job). A workaround given your use case could be to use tags and search. You monitor recipe could tag the node at end (with tag("CephMonitor") or with setting any attribute you wish to search on). After that the...

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

php,api,automation

Look into Cron jobs for scheduling on Unix-like machines. Any decent web host will offer some kind of cron support. Manual can be found here. Example for Monday morning at 0800 hours. * 8 * * 1 php /path/to/my/script.php ...

Vagrant's use against Hyper-V

automation,vagrant,hyper-v

The benefit of using Vagrant is that you could easily support other host OSes than Windows. If you use Hyper-V alone you're stuck to Windows as a host. But if you ever need to run your Windows Server 2012 VMs on Linux, you could do that easily by adding support...

Excel to Powerpoint (But with tables not pictures)

excel,excel-vba,automation,powerpoint

Common problem. The most recently pasted shape will always be "on top" so you can use something like this to get at it: PPPres.Slides(2).Shapes(PPPres.Slides(2).Shapes.Count) Note that by selecting shapes and slides, you open yourself up to weird errors and slow down your code by an order of magnitude. Dim oSh...

Connecting to a SQL server using watir web driver

ruby,sql-server,automation,rubygems,watir-webdriver

As Aetherus has said in the comments, watir-webdriver is only an automation tool for web browsers. It runs in ruby, which means that to get the values from the SQL database you can use any ruby gem you like. A good suggestion would be TinyTDS - https://github.com/rails-sqlserver/tiny_tds.

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

windows,batch-file,ftp,automation

This looks like a typical problem with an FTP active mode. The server cannot connect back to your machine to establish a data transfer connection. That typically happens as nowadays most client machines are behind a firewall or NAT or both, what prevents the FTP active mode from working. To...

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

python-2.7,csv,pandas,automation

Here's what I got. Like I mentioned in my comment, I couldn't get the stop parameter to work like i thought it should. Maybe i'm misunderstanding how its used. I'm assuming you only want the first 5 urls per search. a sample df d = {"B" : ["mangos", "oranges", "apples"]}...

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

automation,autoit

You need to set WinTitleMatchMode option to 4 if you want to use advanced title matching (eg. CLASS). #RequireAdmin ;Will give your script a permission elevation (sometimes its needed) Opt("WinTitleMatchMode", 4) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase Opt("WinSearchChildren", 1) ;0=no, 1=search children also ControlFocus("[CLASS:#32770]","","Edit1") ControlSetText("[CLASS:#32770]", "", "Edit1", "SomeFile.txt") ControlClick("[CLASS:#32770]",...

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

excel,vba,excel-vba,automation

You have to assign a macro to the Check Box. The below code will run when you tick a Check Box which the macro has been assigned to. Option Explicit Public Sub check_box_ticked() Dim cbox As Integer Dim wb As Workbook, ws As Worksheet, checkb as Shape Set wb =...

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

android,selenium,curl,automation,saucelabs

It looks like you used an en-dash for the -H option and the --data-binary option. When you type your command, make sure that you use the minus key for options. If you copy and paste from somewhere you may have to edit your line to convert the en-dash characters to...

Test Run deployment issue: 'Oracle.ManagedDataAccessDTC'

oracle,automation,coded-ui-tests

Mentioned dll is part of Oracle Data Access Components (ODAC). You need to install Oracle client software called 32-bit Oracle Data Access Components (ODAC) with Oracle Developer Tools for Visual Studio This should add Oracle support components for Visual Studio and solve your issue....

Selenium Webdriver: Element Not Visible Exception

java,selenium,selenium-webdriver,automation,qa

You have two buttons with given xpath on this page, first is not visible, thats why you are getting ElementNotVisibleException One is under <div class="loginPopup"> Second (the one you need) is under <div class="page"> So change your xpath to look like this, and it will fix your problem: By.xpath("//div[@class='page']//div[@id='_loginButton']") ...

Ruby Mechanize form input field text

ruby,csv,automation,web-scraping,mechanize

Your error is telling you that something on line 19 in your code is causing the issue for line 442 in mechanize. I tried your sample out in IRB and it seems to work fine: 2.2.2 :001 > require 'mechanize' => true 2.2.2 :002 > agent = Mechanize.new => #<Mechanize:......

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

windows,batch-file,cmd,ftp,automation

Take a look at this line: echo password >> ftpcmd.dat This actually doesn't store password in the dat file but password_ (_ is space). Try to remove spaces before >>: @echo off echo user username>> ftpcmd.dat echo password>> ftpcmd.dat echo /public_html/reports>> ftpcmd.dat echo mput c:\workspace\automation\HtmlReporter\Test_Report.html>> ftpcmd.dat echo quit>> ftpcmd.dat ftp...

How to read a text from a page using Helium?

java,testing,automation,qa,helium

Solved the problem Text("My desire text").getValue(); This command is reading the string...

Identifying clickable element in angularjs - ng-binding

angularjs,automation,protractor

Looking at openbookben.com, it looks like you need the following steps: Send your search query to the appropriate element (sendKeys to the #landingSearch element) Let Protractor wait until the search results become displayed. This is the case when the element(by.css(ul.dropdown-menu)).isDisplayed() promise yields true. Click on one of the search results...

How do I check enable and disabled button using helium?

testing,automation,qa,helium

error: Cannot find element ButtonImpl(">") We need to check the presence of the class (prev btn btn-warning disabled or next btn btn-warning ) in the code. element ">" is not on the page is a picture. UPD: if (driver.findElements(By.xpath("someXpath")).size == 0) or $(By.xpath("someXpath")).shouldNotBe(visible); Code in Java: public static boolean isElementPresent(By...

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

The error message says it does not have enough rights to run as a service, this is slightly different from just being an administrator. Go to Control Panel> Administrative Tools> Local Security Policy. Select Local Policies> User Rights Assignment. Scroll down through the list of policies and look for Log...

How do I use Jenkins CI with Selenium?

selenium,jenkins,automation

See comment to your question. (new member, and I can't yet comment, so simply restating the comment as a formal answer). As mentioned in the comment, Jenkins is simply a CI tool. As to what it brings to the party: It has some nice features and plugins. So it depends...

How to automate file transformation with simultanous execution?

bash,automation,transformation,simultaneous

I want to thank contributors @Songy and @shellter. To answer my question... I ended up using GNU Parallel in order to make these processes run in intervals of 5. Here is the code that I used: parallel -j 5 convert {} "-resample 200 -colorspace Gray" {.}BW.png ::: *.png ; parallel...

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

automation,docker,kubernetes

Found where in the Kubernetes docs they mention updates: https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/replication-controller.md#rolling-updates. Wish it was more automated, but it works. EDIT 1 For automating this, I've found https://www.npmjs.com/package/node-kubernetes-client which since I already automate the rest of my build and deployment with a node process, this will work really well....

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

internet-explorer,com,automation,bho

I have debugged IE, and found out that the parameter will have NULL if your ProtectedMode (low integrity) IWebBrowser2 is becoming non-ProtectedMode (medium integrity) IWebBrowser2. Details: The interesting code is located in IEFRAME!CIEFrameAuto::_HandleProtectedModeRedirect(). It will call IEFRAME!IsProtectedModeProcess() and based on its results will eventually call either FireEvent_NewProcess() with pWB2 parameter...

Can't switch windows during testing by Webdriver JS

javascript,selenium-webdriver,automation,jasmine,protractor

UnknownError: null value in entry: name=null This error means you are trying to switch to a window with undefined name or handle. In other words, the window is not opened at the moment. Also, there are multiple issues with the code you've presented: you need to group two it...

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

java,iphone,testing,automation,appium

This is mostly Selenium question. When you use findElements you are looking for the presence element in DOM. However the element presence still not ensure that the element will visible. In order to verify the element display state you have to use isDisplayed method. Fore example in case the large...

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

c#,selenium,automation,ui-automation,automationelement

So not a complete answer, but one that address my specific situation, not the general one I asked above. Access to file download dialog in Firefox...

Is there a precompiler for JavaScript like Sass?

javascript,automation,compression,partials

Javascript is directly interpreted by your browser so there is no "partials precompiling" stuff. What you are looking for is a task runner like Gulp or Grunt that can launch a task (amongst others) that will concatenate your files. Here is a concat task for Gulp...

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

windows,batch-file,cmd,ftp,automation

Use prompt command to turn off upload confirmation prompts. Without it, ftp uses following commands in the script (close and quit) as answers. As they are not y, the transfer is skipped....

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

javascript,php,automation

basic HTTP Authentication, HTTP Authentication with PHP, php requires and includes, secure login script php, user authentication php, php simple login script, login authentication with sql and php. Here's a few helpful sites: http://www.developerdrive.com/2013/05/adding-a-simple-authentication-using-php-require-and-includes/ http://php.net/manual/en/features.http-auth.php http://blackbe.lt/php-secure-sessions/ http://docstore.mik.ua/orelly/webprog/pcook/ch08_10.htm...

Remove HTML MarkUp

batch-file,automation,markup

Here's a SED script (I use GNUSED) which I adapted from Eric Pement's SED One-liners: the sed line sed -f dehtml.sed yourfilename The file dehtml.sed :a s/<[^>]*>//g;/</N;//ba ...

Writing PHP variable based on jQuery calculations and displaying predetermined value

php,jquery,list,variables,automation

The problem your having is the difference between server-side processing and client-side processing. An easy way to think about this is that PHP is handled before the HTML is even put on the screen replacing all the PHP parts with their variable contents. meaning that adding that php text with...

How to maximize browser window using helium?

java,automation,helium

You can use Selenium WebDriver by integrating with Helium. The following code would work fine: import static com.heliumhq.API.*; import org.openqa.selenium.*; startFirefox("http://www.google.com");//This is the Helium code getDriver().manage().window().maximize();//getDriver is Helium method and other portion is WebDriver code ...

How to automate NuGet package creation using Jenkins?

jenkins,automation,package,nuget,nightly-build

You can create a new Jenkins job and add a windows batch step. There you can use the following command: C:\J\Nuget\NuGet_2.81.exe pack “%WORKSPACE%\PhantomTube\PhantomTube.Core\PhantomTube.Core.csproj” –IncludeReferencedProjects –Version %MajorVersion%.%MinorVersion%.%PatchVersion%%PrereleaseString% -Properties Configuration=Release You can add some of the parameters as JOB's variables. You can find more detailed tutorial here: http://automatetheplanet.com/create-jenkins-job-creating-nuget-packages/...

Get ec2 instance metadata from instance id

python,amazon-ec2,automation,boto

The instance metadata is only available on the instance but you can get a lot of information about your instance using the EC2 API. So, if you have the instance ID you can do this: import boto.ec2 conn = boto.ec2.connect_to_region('us-east-1') # or whatever region you use reservations = conn.get_all_instances(instance_ids='i-12345678') instance...

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

excel,powershell,automation,system32,syswow64

Assuming: C:\Windows\SysWOW64\config\systemprofile\Desktop exists, but: C:\Windows\System32\config\systemprofile\Desktop does not. 64bit PowerShell: Test-Path C:\Windows\SysWOW64\config\systemprofile\Desktop True Test-Path C:\Windows\System32\config\systemprofile\Desktop False 32bit PowerShell: Test-Path C:\Windows\SysWOW64\config\systemprofile\Desktop True Test-Path C:\Windows\System32\config\systemprofile\Desktop True The second test in the 32bit PowerShell is redirected from system32 to syswow64. Checks for syswow64 are usually not...

Download csv file via submit button in R

r,csv,automation,web-scraping

As long as you have a list of WKN or ISIN you can just run this and read/download the files. You can also scrape the WKN/ISINs but that will be much more complicated from this webpage and I assume you have access to such information. library(XML) wkn<-c("DBX0BT","865985") #some stock IDs...

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

unit-testing,selenium,automation,testng

You get NullPointerException because your pointer - driver is created in method launchBrowser(). If you want to use pointer driver in both methods, you have to set it as instance variable. Example: public class Example { Webdriver driver; //instance variable - available for all methods in this class @BeforeTest public...

schedule and automate sqoop import/export tasks

shell,hadoop,automation,hive,sqoop

Run script : $ ./script.sh 20 //------- for 20th entry [email protected]:~/ramu$ cat script.sh #!/bin/bash PART_ID=$1 TARGET_DIR_ID=$PART_ID echo "PART_ID:" $PART_ID "TARGET_DIR_ID: "$TARGET_DIR_ID 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 = '$PART_ID' AND rownum < 10001 AND \$CONDITIONS" --target-dir...

How to call javascript function in VBA

javascript,vba,excel-vba,automation,pop-up

You should be able to overwrite the ConfirmSave function with one which simply returns true: HTMLDoc.parentWindow.execScript "window.ConfirmSave = function(){return true;};" or HTMLDoc.parentWindow.execScript "window.confirm = function(){return true;};" or even HTMLDoc.parentWindow.eval "window.confirm = function(){return true;};" Run that before clicking the button. Tested and works in IE11...

Using result of raise_error (capybara)

ruby-on-rails,rspec,automation,capybara

Answer: If I understand you correctly then errors that appeared while completing the task @done = Module::Task.something(self.attribute) can be accessed via @done.errors.messages Example: If I have User model where attribute username has 2 validations: presence and format then error messages display like this: irb(main):019:0* u = User.new irb(main):022:0* u.save #...

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

node.js,selenium-webdriver,automation,jasmine,protractor

I believe you want a single function to run after takeScreenshot() that will save the screenshot to a different file depending on which browser is running. Is that right? If so, you can query Protractor for the browser name (see Get the current browser name in Protractor test). You can...