New answers tagged

1

Visit this video https://www.youtube.com/watch?v=elbHf9sAy-0 it may help! Good luck!


1

You should install coverage package. I have both python2 and python3 on my computer so I'll show you how to deal with my case and python 3. So say you have the following program: g = input("Enter your age: ") if int(g) < 15: print("You are a child") else: print("You are not a child") Install coverage tool: pip3 install ...


0

I think you have to switch the window first then only you will be navigate to the second-page (layer): please use below piece of code to switch your window : public boolean switchToWindow(String windowname) { Set<String> windowsname=driver.getWindowHandles(); try { windowsname.forEach(window->{ if(...


0

Read this: https://stackoverflow.com/questions/51839937/beautiful-soup-returns-empty-list The reason for the failure is that when you open that website reviews are not loaded automatically. The reviews are loaded only when you scroll down to review section. So you have to inspect the netwrok and find the correct url that loads review ALso try: Try review = ...


0

Maybe try something like: review = soup.findAll('p',{"class":["css-oals0c-unf-heading", "e1qvo2ff8"]}) Also see: https://stackoverflow.com/questions/18725760/beautifulsoup-findall-given-multiple-classes The attribute data-testid is not the same as id, it is a custom html attribute. You could try something like: soup.select('p[...


0

one thing you can do go to terminal-->next to local click on + button and run your program


0

When ever you use a method read its documentation : https://selenium-python.readthedocs.io/locating-elements.html continue_link = driver.find_element_by_link_text('Continue') continue_link = driver.find_element_by_partial_link_text('Conti') This two element locators identifies the element only using link text. In selenium a link is "an anchor tag" ...


2

Try by using xpath selector In which you want to change your selector code as shown below driver.find_element_by_xpath('//div[@class="css-ais6tt"]//button[3]') This will work


0

This works botonAceptar = driver.find_element_by_xpath('//a[@id="close_entrance_terms"]').click()


2

Remove \' from the beginning and from the end. So that your code would look like: gPath1 = str("//div[@id=\"groups\"]/div/div/div/div/div[2]/div[") gPath2 = str(i) gPath3 = str("]/div/div/button") gPath = gPath1 + gPath2 + gPath3 driver.find_element_by_xpath(gPath).click()


0

You can add hl parameter to your query like https://www.google.com/?hl=es Reference: https://sites.google.com/site/tomihasa/google-language-codes you can define the web interface language to be English by adding hl=en to the end of the URL and after the change the URL will look like this: http://www.google.com/search?hl=en


1

Your problem might be sames as https://stackoverflow.com/questions/20888592/gettext-method-of-selenium-chrome-driver-sometimes-returns-an-empty-string But upon initial checking on the attributes of your element, I would suggest to use "outerText" attribute. You can check your element's properties in developer's tool Console by typing $x("...


Top 50 recent answers are included