automation

Why pyautogui click not actually clicking

拈花ヽ惹草 提交于 2021-02-18 08:43:19
问题 I try to use the click function of Pyautogui, but the actual click doesn't happen or at least there is no change at the page though it moves the mouse to the right place. The window is in focus (I think) because the program works well with other pages. I could only find one relevant question: having trouble clicking in program - pyautogui. However, there was no accepted answer for that and I tried the given answer in the link but didn't work (It was in python2 but I'm in python3). I use Linux

One Python script giving “user input” to another python script

一笑奈何 提交于 2021-02-18 07:41:05
问题 this is my first question, I hope I'm doing this right. let's say I have these this file: "simple.py": a=raw_input("your name?") print "Hello",a but with a different script, I want to execute "simple.py" many time and giving the input automatically, that would work like: "everyone.py" run simple.py input=Alice run simple.py input=Bob ... to get "Hello Alice" "Hello Bob" ... I know it's possible to make "everyone.py" run "simple.py" by using os.system, but is there any practical way to do

Setting accessibility identifier programmatically on UIBarButtonItem

醉酒当歌 提交于 2021-02-18 03:49:55
问题 The accessibility identifier is a developer generated ID for GUI objects, which can be used for automation tests. A UIBarButtonItem does not implement UIAccessibilityIdentification . However is there a possibility that I can assign an accessibility identifier? 回答1: You could subclass UIBarButtonItem and implement the UIAccessibilityIdentification protocol in that subclass, lets's say BarButtonWithAccesibility . In BarButtonWithAccesibility.h : @interface BarButtonWithAccesibility :

No keyword with name '${body}= Create Dictionary' found

放肆的年华 提交于 2021-02-17 07:16:19
问题 *** settings *** Library RequestsLibrary Library Collections Library OperatingSystem Library SeleniumLibrary *** Variables *** ${username} XXXXXX ${password} YYYYYY ${locale} ZZZZ *** test cases *** TC1 ${body}= Create Dictionary username= ${username} password= ${password} ${header}= Create Dictionary Accept=application/json, text/plain, */* Content-Type=application/json, Accept-Language=${locale}, Create Session OA2 ${base_url} ${response}= post request OA2 /oauth/v2/token data= ${body}

Is there way to disable CORS check using RemoteWebDriver for SauceLabs

我只是一个虾纸丫 提交于 2021-02-17 05:54:05
问题 Question says it all, I m trying to execute some selenium tests on SauceLabs, the test loads a webpage that makes a cross domain request. I was thinking is there a way to disable CORS, in platform-independent way through code. 回答1: While using ChromeDriver / Chrome combo to disable cors check you can use the --disable-web-security argument. which is defined in content_switches.cc as: // Don't enforce the same-origin policy. (Used by people testing their sites.) const char kDisableWebSecurity[

Using Selenium without using any browser

北城以北 提交于 2021-02-17 05:07:44
问题 I have been trying to do web automation using selenium,Is there any way to use browser like chrome,firefox without actually installing then, like using some alternate options, or having portable versions of them.If I can use portable versions how do i tell selenium to use it? 回答1: To use the browsers like google-chrome and firefox you have to install the full-blown browser. You can find a detailed discussion in Is Chrome installation needed or only chromedriver when using Selenium? As an

Using Selenium without using any browser

烂漫一生 提交于 2021-02-17 05:07:09
问题 I have been trying to do web automation using selenium,Is there any way to use browser like chrome,firefox without actually installing then, like using some alternate options, or having portable versions of them.If I can use portable versions how do i tell selenium to use it? 回答1: To use the browsers like google-chrome and firefox you have to install the full-blown browser. You can find a detailed discussion in Is Chrome installation needed or only chromedriver when using Selenium? As an

Using Selenium without using any browser

99封情书 提交于 2021-02-17 05:06:27
问题 I have been trying to do web automation using selenium,Is there any way to use browser like chrome,firefox without actually installing then, like using some alternate options, or having portable versions of them.If I can use portable versions how do i tell selenium to use it? 回答1: To use the browsers like google-chrome and firefox you have to install the full-blown browser. You can find a detailed discussion in Is Chrome installation needed or only chromedriver when using Selenium? As an

Cannot cast WebElement to org.openqa.selenium.internal.Locatable

混江龙づ霸主 提交于 2021-02-16 14:35:08
问题 I am trying to automate resize a column from a table, by using Actions class this is my code: public boolean resizeColumn(String columnToResize, String toColumn) { try { WebElement column = findElement(columnResize, columnToResize); WebElement moveToPosition = findElement(columnByName, toColumn); waitUntilClickable(column); //click on resize getSupport().clickAndHold(column); .. ... In PageSupport class: public void clickAndHold(WebElement onElement) { Actions actions = new Actions(driver);

Excel VBA click website button with no name or ID that uses JSON

北城余情 提交于 2021-02-11 17:39:33
问题 I am using excel VBA to open this website: Legal and General, Then it needs to click the "Fund prices and charges" button. Inspecting the web page with chrome, I can see this button has the following code: <div class=" selected tab" tabindex ="0" role="button" aria-pressed="true">...</div> The HTML 'view source' suggests a script type="application/JSON" I'm very confused by all of this. Does anyone know how I can select this button? I have this section of code so far: Set HTMLDoc = .document