from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import Select
import os
xpaths = { 'video' : "//video[@id='video']",
}
from selenium import webdriver
profile = webdriver.FirefoxProfile()
profile.set_preference("general.useragent.override", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.0 Safari/537.36")
driver = webdriver.Firefox(profile)
mydriver = webdriver.Firefox()
baseurl = "XXXX"
mydriver.get(baseurl)
It's not changing the user agent. I want the user agent to be chrome. I don't know what's wrong...
And also, here's what i'd like it to do: Go to the website, if it redirects to another url > Goes back to main page and keeps doing that until it finds (id:video) I have not implemented this yet because i have no idea how to... The website i'm trying to automate got a vid and it appears sometimes. What i'd like this to do is keep visiting the website until it finds the id:video clicks it and waits.
Help is appreciated :)