selenium-chromedriver

Filling in login forms in Instagram using selenium and webdriver (chrome) python OSX

僤鯓⒐⒋嵵緔 提交于 2020-01-18 04:01:42
问题 I want to log in to instagram using selenium, but I can't seem to enter values into the fields. Here's my script: #go to this address browser.get('https://www.instagram.com') #sleep for 1 seconds sleep(1) #find the 'login' button on homepage login_elem = browser.find_element_by_xpath( '//*[@id="react-root"]/section/main/article/div[2]/div[2]/p/a') #navigate to login page login_elem.click() Having trouble from here onwards: #locate the username field within the form unform = browser.find

Filling in login forms in Instagram using selenium and webdriver (chrome) python OSX

不羁的心 提交于 2020-01-18 04:01:27
问题 I want to log in to instagram using selenium, but I can't seem to enter values into the fields. Here's my script: #go to this address browser.get('https://www.instagram.com') #sleep for 1 seconds sleep(1) #find the 'login' button on homepage login_elem = browser.find_element_by_xpath( '//*[@id="react-root"]/section/main/article/div[2]/div[2]/p/a') #navigate to login page login_elem.click() Having trouble from here onwards: #locate the username field within the form unform = browser.find

Get value with Selenium C#

天涯浪子 提交于 2020-01-17 06:22:12
问题 I have `<button class="button button--chromeless" data-action="select-anchor" data-action-value="fba4">Top highlight</button>` I need get result "fba4" from data-action-value. I tried: IWebElement ell = driver.FindElement(By.CssSelector("button[data-action-value]")); I think that I need be based on Top highlight to get value fba4 but I don't know how? 回答1: Use .GetAttribute("data-action-value") string element = driver.FindElement(By.CssSelector("button[data-action-value]")).GetAttribute("data

unknown error: session deleted because of page crash from unknown error: cannot determine loading status from tab crashed with ChromeDriver Selenium

陌路散爱 提交于 2020-01-16 16:59:04
问题 I'm using InstaPy which use Python and Selenium. I start the script per Cron and from time to time it crashes. So it'r really irregular, sometimes it runs well through. I'v posted on GitHub Repo as well already but didn't get an answer there, so i'm asking here now if someone has an idea why. It's a digital ocean ubuntu server and i'm using it on headless mode. The driver version are visible on the log. here are error messages: ERROR [2018-12-10 09:53:54] [user] Error occurred while deleting

unknown error: session deleted because of page crash from unknown error: cannot determine loading status from tab crashed with ChromeDriver Selenium

我的梦境 提交于 2020-01-16 16:58:09
问题 I'm using InstaPy which use Python and Selenium. I start the script per Cron and from time to time it crashes. So it'r really irregular, sometimes it runs well through. I'v posted on GitHub Repo as well already but didn't get an answer there, so i'm asking here now if someone has an idea why. It's a digital ocean ubuntu server and i'm using it on headless mode. The driver version are visible on the log. here are error messages: ERROR [2018-12-10 09:53:54] [user] Error occurred while deleting

How to enter the credentials in a Javascript pop-up? We can't pass the credentials in the link

此生再无相见时 提交于 2020-01-16 12:00:29
问题 Edit: I solved the problem by using " AutoIt ". However as Alex said AutoIt is platform dependent I am going to try and implement it. I have link A, where I need to enter my email Id, it then automatically redirects to link B which has a javascript pop-up which needs email id and password to redirect me to the desired page. This is what I have done till now. I tried passing the credentials in the link A, but it didn't work. Instead of going from link A to link B, I copied link B and passed

Disable all downloads with ChromeDriver and Selenium

怎甘沉沦 提交于 2020-01-16 09:21:19
问题 When accessing some static files such as hudoig.gov/sites/default/files/documents/2016-FW-1007.pdf (random example) with Selenium using ChromeDriver, the file is automatically downloaded to my default download directory. Is there a way to disable this default behavior and prevent files from being saved ? Thank you. NB: My question is similar to the following unanswered question but in my case I actually want to disable downloads even when clicking download links: Is it possible to disable

How disable debuger on chrome webdriver in Java?

时光毁灭记忆、已成空白 提交于 2020-01-16 08:53:10
问题 My target application use <script type="text/javascript">debugger;</script> So my page is blocked by break point. How disable debugger on chrome webdriver in Java? import java.util.concurrent.TimeUnit; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.chrome.ChromeOptions; import com.github.noraui.utils.Utilities.OperatingSystem; import com.github.noraui.utils.Utilities.SystemArchitecture; public class Bot { public static void

Selenium ChromeDriver do no start on linux

早过忘川 提交于 2020-01-16 04:22:25
问题 Im trying to run my tests in junit, but im encountering the following error: >org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. Build info: version: '2.33.0', revision: '4e90c97', time: '2013-05-22 15:32:38' System info: os.name: 'Linux', os.arch: 'i386', os.version: '3.2.0-45-generic-pae', java.version: '1.7.0_21' Driver info: driver.version: RemoteWebDriver at org

While using the chromedriver with Selenium, how do I correct a timeout error?

心已入冬 提交于 2020-01-15 11:16:30
问题 I may be missing something simple here but I have tried a lot already without any luck. I'm new to selenium and I cannot correct the following issue. When navigating to a web-page using get() I continually get a timeout message. The page loads properly but after everything on the page loads (i assume it may have something to do with how long it takes to load due to the ads loading) I get this error. selenium.common.exceptions.TimeoutException: Message: timeout (Session info: chrome=65.0.3325