के साथ स्विचिंग मैं सोच रहा हूं कि क्या मैं फोरफ़ॉक्स ड्रायवर का नया उदाहरण बनाये बिना फ्लाई पर उपयोगकर्ता एजेंट प्रोफ़ाइल बदल सकता हूं? मेरे पास निम्न कोड है, जिसे मैं आईफोन या आईपैड इत्यादि के लिए उपयोगकर्ता एजेंट में पास कर सकता हूं .. यह ठीक काम करता है, लेकिन मुझे प्रत्येक टेस्ट के लिए एक नया उदाहरण बनाना है जो धीमा है क्योंकि यह ब्राउज़र को खोलता/बंद करता है। जैसे आईफोन उपयोगकर्ता एजेंट के साथ अपने परीक्षण करने के बाद, मैं प्रोफाइल को एंड्रॉइड उपयोगकर्ता एजेंट या आईपैड उपयोगकर्ता एजेंट पर स्विच करना चाहता हूं, क्या ड्राइवर को नया इंस्टेंस बनाने की आवश्यकता के बिना इसे बदलने का विकल्प मिलता है?WebDriver FireFoxProfile UserAgent FireFoxDriver
FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("general.useragent.override","some user agent, like iphone or iPad");
WebDriver driver = new FirefoxDriver(profile);
// do some tests
// set profile to new user agent
// profile.setPreference("general.useragent.override","some android user agent");
// can i now set the driver to the new profile here and perform more tests on this same instance of the driver?
अब तक अब आप ऐसा नहीं कर सकते हैं। – p0deje
क्या कोई समाधान है? – andyf