selenium

How can i send User name and password in Popup using selenium

流过昼夜 提交于 2021-02-10 14:22:12
问题 I'm automation engineer i'm going to automate e-commerce site. now issue is that we are using magneto admin panel my first step to enter user and password then site will be open i'm loose to find the popup element because its a server authentications and i'm unable to inspect the element.i have attached the snapshot that particular popup kindly have a look at this image and help will be regarded Login Screen i want to enter user password with help of selenium script 回答1: You can provide

How to close the Modal using Selenium WebDriver?

我的梦境 提交于 2021-02-10 14:19:29
问题 I have a dropdown list, when I click on any of the dropdown value then a modal get opens, When I click outside the modal, it will get close. How to handle it with Selenium WebDriver? here is my Modal Code <div class="modal fade bd-example-modal-sm show" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" style="display: block;"> <div class="modal-dialog modal-sm"> <div class="modal-content">You click on Dropdown hover Option </div> </div> I have tried with below code driver

Selenium Python - Get Network response body

泪湿孤枕 提交于 2021-02-10 14:17:09
问题 I use Selenium to react to the reception of data following a GET request from a website. The API called by the website is not public, so if I use the URL of the request to retrieve the data, I get {"message":"Unauthenticated."} . All I've managed to do so far is to retrieve the header of the response. I found here that using driver.execute_cdp_cmd('Network.getResponseBody', {...}) might be a solution to my problem. Here is a sample of my code: import json from selenium import webdriver from

Capturing info from console using Python

删除回忆录丶 提交于 2021-02-10 14:16:28
问题 I'm creating a script where I'm trying to rip m4a files from a website specifically. I'm using BS4 and selenium for this purpose presently. I'm having some trouble getting the info. The file link is not located in the HTML source for the page. Instead, I can only find it in the console. The link I'm trying to get is here in this image (https://imgur.com/a/DLwcE0p) labeled "audio_url_m4a:". Here's some sample code I'm using: from selenium import webdriver from selenium.webdriver.common.desired

Selenium Python - Get Network response body

走远了吗. 提交于 2021-02-10 14:15:44
问题 I use Selenium to react to the reception of data following a GET request from a website. The API called by the website is not public, so if I use the URL of the request to retrieve the data, I get {"message":"Unauthenticated."} . All I've managed to do so far is to retrieve the header of the response. I found here that using driver.execute_cdp_cmd('Network.getResponseBody', {...}) might be a solution to my problem. Here is a sample of my code: import json from selenium import webdriver from

Safari mobile emulation for web app via Selenium

北城以北 提交于 2021-02-10 14:14:56
问题 Need to test responsive design for web app. I understand that browser didn't emulate like real device or even device emulator, but i don't need it. Note: i'm looking for not to run Safari inside emulator, but to activate mobile emulation in Safari question 1 : Is it possible to start Safari via selenium with predefined mobile emulation, like in Chrome here Map<String, String> mobileEmulation = new HashMap<>(); mobileEmulation.put("deviceName", "Nexus 5"); ChromeOptions chromeOptions = new

Unable to find the xpath of star using selenium & java

[亡魂溺海] 提交于 2021-02-10 14:13:14
问题 Thank you in advance ! url - https://www.tripadvisor.in/UserReviewEdit-g641714-d1156207-Club_Mahindra_Madikeri_Coorg-Madikeri_Kodagu_Coorg_Karnataka.html i need to hover on the stars and select the 5th star. please find my code :- private static void setRating(String star) { //new Actions(driver).moveToElement(driver.findElement(By.xpath("//*[@id='qid10']/option[1]"))).perform(); List<WebElement> rating = driver.findElements(By.xpath("//span[@class='ui_bubble_rating fl bubble_00']")); rating

Unable to find the xpath of star using selenium & java

梦想与她 提交于 2021-02-10 14:12:52
问题 Thank you in advance ! url - https://www.tripadvisor.in/UserReviewEdit-g641714-d1156207-Club_Mahindra_Madikeri_Coorg-Madikeri_Kodagu_Coorg_Karnataka.html i need to hover on the stars and select the 5th star. please find my code :- private static void setRating(String star) { //new Actions(driver).moveToElement(driver.findElement(By.xpath("//*[@id='qid10']/option[1]"))).perform(); List<WebElement> rating = driver.findElements(By.xpath("//span[@class='ui_bubble_rating fl bubble_00']")); rating

Unable to find the xpath of star using selenium & java

ε祈祈猫儿з 提交于 2021-02-10 14:07:50
问题 Thank you in advance ! url - https://www.tripadvisor.in/UserReviewEdit-g641714-d1156207-Club_Mahindra_Madikeri_Coorg-Madikeri_Kodagu_Coorg_Karnataka.html i need to hover on the stars and select the 5th star. please find my code :- private static void setRating(String star) { //new Actions(driver).moveToElement(driver.findElement(By.xpath("//*[@id='qid10']/option[1]"))).perform(); List<WebElement> rating = driver.findElements(By.xpath("//span[@class='ui_bubble_rating fl bubble_00']")); rating

send_keys to hidden elements

对着背影说爱祢 提交于 2021-02-10 14:01:28
问题 I want to send a text to a text box of a page. Here is hidden element on page: <textarea class="chatterTopicsEnabled groupAtMentionsEnabled publishertextarea" id="publishereditablearea" name="publishereditablearea" role="textbox" tabindex="0" title="Topics" type="text" wrap="soft" data-uidsfdc="112" style="height: 208px;">Topics</textarea> <input type="hidden" id="publisherprompttext" name="publisherprompttext" value="Topics"> My code by which i can click the text box but can do nothing to