browser-automation

How to use synchronize in Capybara exactly?

丶灬走出姿态 提交于 2019-12-22 04:10:06
问题 If how to use wait_until is pretty clear (I've used the methods like this while creating tests through the native Webdriver methods), but not the new synchronize method (sorry:)). I've read the theme about why wait_until is deprecated, I've read the article about that, I've read the docs with method description and also read the code where the description present too. But I didn't find any example or tutorial how exactly to use this method. Anybody, please, provide few cases where I (and

Manipulating browser (window) size using Splinter

末鹿安然 提交于 2019-12-21 10:05:10
问题 I am trying to use the Firefox driver for Splinter to test some responsive design. Naturally, this requires me to resize the browser window. I can't find anything at all about browser resizing in the documentation. How can I do this? from splinter import Browser with Browser() as browser: # How do I set the browser size? 回答1: Just do this: browser.driver.set_window_size(640, 480) The Splinter API doesn't seem to directly support this - or at least not yet. The generic API docs, as well as the

Login to a website using VBA

风流意气都作罢 提交于 2019-12-17 21:34:09
问题 Im a fresher to Excel Macros (VBA) and looking for a way to automate IE to login to a website and proceed to a certain page. website URL : https://www.mast-technicalservices.com/ecp/index2.jsp and need to fill the login details and click continue. Sub WebsiteLogIn() Dim nURL As String Dim UNElementID As String Dim UserName As String Dim PWElementID As String Dim Password As String Dim SIElementID As String Set LoginData = ThisWorkbook.Sheets("Sheet1") Set nURL = "https://www.mast

How to get data from Ajax request in Selenium?

半世苍凉 提交于 2019-12-14 02:28:38
问题 I have been trying to check the balances of Starbucks gift cards in my application, https://www.starbucks.com/card I was trying to catch the response made with ajax request, once check balance button is clicked automated, How can I get the ajax response in Selenium? using (var driver = new ChromeDriver()) { driver.Navigate().GoToUrl(@"https://www.starbucks.com/card"); driver.FindElement(By.Id("Card_Number")).SendKeys("7848549479363805"); driver.FindElement(By.Id("Card_Pin")).SendKeys(

Possible to open/display/render a headless Selenium session?

心已入冬 提交于 2019-12-12 17:06:50
问题 I know this is sort of counter to the purpose of headless automation, but... I've got an automation test running using Selenium and Chromedriver in headless mode. I'd prefer to keep it running headless, but occasionally, it runs into an error that really needs to be looked at and interacted with. Is it possible to render and interact with a headless session? Maybe by duplicating the headless browser in a non-headless one? I can connect through remote-debugging, but the Dev Tools doesn't seem

How to automate to get image size and url in a webpage/website

会有一股神秘感。 提交于 2019-12-12 06:59:21
问题 Can we automate to get individual image size(Kb) in a webpage/website using selenium. there is any tool/process is available to automate this process. I want to automate to get all images URL having more than 50kb in a webpage/website. Please give your suggestions on this. 回答1: To get an image size on the webpage, you could ask to server. i.e; use URLConnection class to represent a communication link between application and that URL. URLConnection urlConnection = new URL(we.getAttribute("src"

Issues with edge webdriver

扶醉桌前 提交于 2019-12-12 03:34:53
问题 I am trying to execute automated test-cases on Microsoft Edge browser. While executing a test-case, Edge get launched, page get loaded but then it fails to execute javaScript (using IJavaScriptExecutor) and throw below exception: -> error: unknown error (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 31 milliseconds Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 17:00:58' System info: host: 'DESKTOP-VJGM30D', ip: '172.20.13

Browser() in Python shows errors in IDLE

a 夏天 提交于 2019-12-12 03:18:13
问题 I have some code here which is basically a bot that spams a specific google form: while True: browser = Browser() print("Form Filling Begun") browser.visit('https://docs.google.com/forms/d/1Lyoox1FIpOP5nceVHqmdA3Exqf8PMCxaBgWIYQ67yX8/viewform?c=0&w=1') browser.fill('entry.1796849606', 'test') browser.fill('entry.1233774681', 'test') browser.fill('entry.1687034525', 'test') browser.fill('entry.2085519362', 'test') browser.fill('entry.2085519362', 'test') browser.fill('entry.87435301', 'test')

How to upload image with angular components using python selenium

情到浓时终转凉″ 提交于 2019-12-11 15:22:39
问题 My automation script needs to upload an image to the webpage but I can't seem to upload the image using the normal send_keys method. I suspect it has something to do with the Angular components but I'm not sure how to access them using Selenium webdriver. I have tried the following: Automate file upload using Selenium and ng-file-upload and How to upload file using python+selenium? These don't seem to have the solution I'm looking for. <button class="md-raised choose-file md-button md-ink

Login located in iFrame not reloading page using selenium

和自甴很熟 提交于 2019-12-11 07:51:55
问题 I'm trying to create a script to log into my account. I have gotten to the point where I can enter the username and such in, but whether I submit, send enter, or click the login button, the iFrame box goes blank, yet the page doesn't reload to the logged in page. I've noticed that regardless of the number of sleeps I put in, the result doesn't change. However, if I manually press enter or click the submit button, the page will reload properly. Any solutions? Edit: http://mpe.berklee.edu