automation

PHP number: decimal point visible only if needed

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-20 08:59:10
问题 I'd like to know if exists some function to automatically format a number by it's decimal, so if I have: <?php // $sql_result["col_number"] == 1,455.75 number_format ($sql_result["col_number"], 2, ".", ""); // will return 1455.75 // $sql_result["col_number"] == 1,455.00 number_format ($sql_result["col_number"], 2, ".", ""); // could I get 1455 instead of 1455.00? ?> so my answer is if does exist some way to remove the decimals if I have DECIMAL data forma in my DB only when it's round? Or

Best AutoHotKey macros? [closed]

若如初见. 提交于 2019-12-20 08:03:35
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . I use AutoHotKey for Windows macros. Most commonly I use it to define hotkeys that start/focus particular apps, and one to send an

Import error when using netmiko with django : No module named '_cffi_backend'

╄→尐↘猪︶ㄣ 提交于 2019-12-20 07:46:30
问题 Netmiko works fine when I execute below script file (test.py) from the linux cli #!/var/www/html/devopsenv/bin/python from netmiko import ConnectHandler import getpass cisco_asr = { 'device_type': 'cisco_xr', 'ip': 'my ip', 'username': 'user', 'password': 'pass', 'verbose': True } net_connect = ConnectHandler(**cisco_asr) config_commands = [ 'int BE222.2481', 'vrf devops_test', 'ip add 10.1.1.1/30'] output = net_connect.send_config_set(config_commands) #net_connect.commit() print(output)

how to add explicit wait in drop down in selenium which is dependent on another dropdown?

帅比萌擦擦* 提交于 2019-12-20 07:45:16
问题 how to add explicit wait in drop down using selenium until it finds the text ? 回答1: WebDriver wait = new WebDriver(Driver, Seconds); boolean status; status = wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(""))) != null; 回答2: Try this below code. WebDriverWait wait = new WebDriverWait(driver, 15); //add Explicit Wait wait.until(ExpectedConditions.elementToBeClickable(driver.findElement(By.xpath("Your xpath")))); driver.findElement(By.xpath("Your xpath")).click(); //After

How to apply cell background color using HSSF using Java code

会有一股神秘感。 提交于 2019-12-20 07:27:00
问题 I'm trying to format the cell background color based on the Testcase Execution status like if the test case got passed then the cell background should become Green and text color should be White . Similarly for Failed test cases cell background color : Red and Text color : White For that I tried the following script. Background: HSSFCellStyle style = wBook.createCellStyle() style.setFillBackgroundColor(IndexedColors.GREEN.getIndex()) Foreground: HSSFFont font = wBook.createFont() font

How to select particular location from the drop down list which is initiated dynamically using api response in selenium webdriver?

三世轮回 提交于 2019-12-20 07:26:21
问题 Problem Description: I am trying to automate the filling of the form in which there's a locality dropdown list. I am facing problem in selecting the option which are suggest in the suggestion list. The options in the suggestions list are provided by an api response i.e its dynamic. I am not able to select one of the option from the suggested list. String Locality ="//label[contains(text(),'Locality')]/following-sibling::input"; public void insertData(DataTable str) throws InterruptedException

Espresso Testing call view button click waiting after call api response data progressDialog dimission

一曲冷凌霜 提交于 2019-12-20 06:40:45
问题 I develop automation testing using via espresso library. Sometime I ever got error message "Could not launch intent Intent" when running test is make long time I call view btn click after api response data progress-dialog dimission. Please help me something ideas for those error who have experience automation testing using via espresso technic Thanks :D 回答1: This probably happens when there is a progress dialog after test finishes. So your next test can't launch itself when progress dialog is

Looping on URLs from Excel file using UiPath

随声附和 提交于 2019-12-20 06:28:57
问题 I have tried several ways but somehow they dont look clean; I have a URL file in Excel format (400+ urls in a column) I want UiPath to read from that file and browse these URLs one by one I tried with making "Navigate to" read from a variable that reads from Excel but it just gets messy and does not work. anyone can suggest some easy way to do it? 回答1: Please elaborate what you want to do. As per my understanding, you have a Excel file with a column containing the URLs and you want to visit

Sikuli Integrator C#

a 夏天 提交于 2019-12-20 05:44:10
问题 I want to use SikuliIntegrator in C#. I run VS as administrator, install SikuliIntegrator throught NuGet manager and want to test him on simple task. Heres my code using SikuliModule; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SikuliTrainingNet { class Program { static void Main(string[] args) { string MyPicture = @"c:\111\Sik\MyPicture.png"; SikuliAction.Click(MyPicture); } } } after running code (and have

Can a Batch File Tell a program to save a file as? (If so how)

北城余情 提交于 2019-12-20 05:39:20
问题 I am currently trying to automate a file transfer process for work and I am not sure how to have a program save a file. Currently I have created a working batch to move a log file from the point of creation to the correct folder and rename it to include the date. Then use the start function to open that file. All of this works so far. Now I need that file which was opened to go File>save as>save It doesn't need the name changed. The program that opens it only saves as CVS and that is my