selenium

Pyppeteer how to login on page with type

百般思念 提交于 2021-01-29 17:17:57
问题 I was using selenium + chrome driver for my python telegram bot deployed on linux server with docker. Everything is working, but its not supporting async so my app can't do anything else during scrapping. I heard about Pyppeteer, but having some troubles with getting page i need to scrape. Webpage requires me to login. Here are steps: Open page. Click on auth button: <button class="btn btn-outline-warning kt-font-dark mr-2" type="button" id="btn_auth"> <i class="fa fa-key"></i> Enter </button

Chrome browser fails to launch in Appium using Java

寵の児 提交于 2021-01-29 16:35:17
问题 someone please help me to resolve this issue. Thanks in advance. While running java code to open chrome browser in Emulator, I am getting "Failed to start Chromedriver session: A new session could not be created. Details: session not created: This version of ChromeDriver only supports Chrome version 83" error message. public class ChromeBrowserLaunch { AppiumDriver driver; public static void main(String[] args) throws MalformedURLException { DesiredCapabilities cap = new DesiredCapabilities()

Scheduled trigger of chrome extension app

試著忘記壹切 提交于 2021-01-29 15:50:18
问题 I'm trying to find a way to implement: - this code using python - schedule a timed trigger - select a tab on the google chrome I've copied and pasted the solution into my python just to test it but seem to be getting a URL error below, can someone help me understand why a variable is facing a syntax error? Here is my code: from selenium import webdriver from selenium.webdriver import ChromeOptions from Common_Methods.GenericMethods import * import pyautogui #<== need this to click on

Selenium does not install add-on in Firefox when using the addExtensions option

▼魔方 西西 提交于 2021-01-29 15:50:01
问题 I want to install a custom XPI file in Firefox when running it with selenium and geckodriver in a TypeScript and Jest context. The important part of the test script is this: let driver: webdriver.WebDriver; const firefoxExt = path.resolve(__dirname, '..', '..', 'extension', 'firefox.xpi'); const firefoxOptions = new firefox.Options().addExtensions(firefoxExt); driver = new webdriver.Builder().forBrowser('firefox').setFirefoxOptions(firefoxOptions).build(); I am expecting Firefox to launch and

Data Scraping using selenium unable to find the search result

自闭症网瘾萝莉.ら 提交于 2021-01-29 15:41:56
问题 we are going to scrape data from the below site https://ras.arbitr.ru Step: 1.Load the webpage 2.Click the View button [Left panel] 3.To verify the search result loaded in the right-side panel or not? Normal click from the web browser's working perfectly, when I try to click from the web driver it's not loading the result. I'm using the below attributes to click the view button using the ID Using button caption Using CSS selector Click using Javascript Using Keyboard event Code: WebUI

getting table value from nowgoal has got an index error

廉价感情. 提交于 2021-01-29 15:37:20
问题 I am quite new to scraping. I am getting links from nowgoal below is how I started navigating to above page. I do not wish to get link for all matches. but I will have an input txt file, which is attached Here and use the selected league and date. The following code will initialize as input: #Intialisation league_index =[] final_list = [] j = 0 #config load config = RawConfigParser() configFilePath = r'.\config.txt' config.read(configFilePath) date = config.get('database_config','date')

Use selenium to get information out a table with changing xpaths

廉价感情. 提交于 2021-01-29 15:14:13
问题 I am trying to loop through a list of companies and scrap their environmental ratings from CSRhub. I would post the link as an example, but it is by log in only. My scraper has not been getting accurate numbers as the location of the ratings changes depending on the rows of the table on the webpage. For example: Here we see that Target has 5 rows in the table and the xpath for 73 (Energy & Climate Change rating) is: // [@id="rating-section"]/div/div2/div/div/table/tbody/tr[23]/td[5]/div/table

org.testng.TestNGException: An error occurred while instantiating class

倾然丶 夕夏残阳落幕 提交于 2021-01-29 14:59:59
问题 My selenium automation framework using TestNG is working fine on the windows 7 but when I configured the same framework on the windows 10 I'm facing the below issue. Could you please help me on the same. Test Details: Operating system: windows 10 64 bit Eclipse Version: Version: 2019-03 (4.11.0) TestNG version: 6.14.3 [RemoteTestNG] detected TestNG version 6.14.3 org.testng.TestNGException: An error occurred while instantiating class com.saf.aw_nxt_end_to_end_tests.AW_NXT_Login: org/w3c/dom

Selenium Java : Text retrival from h1 tag

馋奶兔 提交于 2021-01-29 14:32:18
问题 I am aware of .getAttribute("innerHTML") , which is one of the ways to retrieve the value of h1 tag but my HTML looks like this: I can reach h1 tag but not able to reach innerHTML . I want to retrieve text from innerHTML using selenium WebDriver in Java Solution I used : First I located h1 tag using @FindBy(xpath = "//*[@id=\"main\"]/h1") with element name as Findelement, then used Findelement.getAttribute("[0].innerHTML") to retrieve text but while running program is throwing java.lang

What is the difference between maxSession and maxInstances when using Selenium Grid for parallel testing

我的梦境 提交于 2021-01-29 14:28:36
问题 I am new to selenium grid. So can someone please explain me the difference between the maxSession and maxInstances . And also how many parallel browsers can be used in one node? 回答1: As per the documentation by default, starting a Selenium Grid Node allows for concurrent use of 11 browsers, comprising of 5 Firefox , 5 Chrome and 1 Internet Explorer browser. The maximum number of concurrent tests is set to 5 by default. To change this configuration and other browser settings, you can pass in